Comments (12)
Hi @kpribic you can use this for "fool-proofing" the HEPsub implementation: https://flows.nodered.org/flow/a239b92f9fa71e7e86a6c1e5bb6613fc/in/nVb9qLApXKsu
EDIT: might need to patch the examples w/ UUIDv4 generators next
from hepsub.
@kpribic feel free to open any issues, this was designed for an older version of the API and might needs a few fixed I'd be happy to provide. Thanks!
from hepsub.
you can take the master branch of homer-app, but better if you will wait untill end of this day and we will create couple fixes and a new package
from hepsub.
OK, thanks for the fast reply, I'll wait until the new package.
from hepsub.
Tried again with
# /usr/local/bin/homer-app --version
VERSION: 1.1.15
same result:
POST /api/v3/agent/subscribe HTTP/1.1
connection: keep-alive
accept: text/html,text/javascript,application/json,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
cookie:
accept-encoding: gzip,deflate,sdch
pragma: no-cache
cache-control: no-cache
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
host: localhost:9080
content-type: application/json
content-length: 166
{"uuid":"5b5e3950-4275-11ea-936f-8f4e438b7873","host":"localhost","port":18088,"protocol":"http","path":"/get","type":"cdr","ttl":300,"node":"test-endpoint","gid":10}
HTTP/1.1 400 Bad Request
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Content-Type: application/json; charset=UTF-8
Vary: Origin
Vary: Accept-Encoding
Date: Wed, 29 Jan 2020 08:57:19 GMT
Content-Length: 93
from hepsub.
Did you generate a token (Auth-Token:) ?
from hepsub.
No, I wasn't aware I need to generate any auth.
I found it now in HomerUI, generated one but now I don't know how to use it with hepsup. I presume it should be added in config somewhere, but I don't see where should I put it.
from hepsub.
One note, I didn't make any request manually, I just started the app with npm start and got error:
# npm start
> [email protected] start /home/ibfr4eq.local/kpribic/hepsub
> node helloworld.js
API Server started 18088
REGISTER API ERROR 400 Bad Request
REGISTER API undefined
from hepsub.
so, the token that you have generated, please add to the example:
at the end it have to look like :
Auth-Token: your token here
from hepsub.
7915ed8
please take it and recheck
from hepsub.
It works now, managed to register agent :-)
Body: {"url":"http://localhost:9080/api/v3/agent/subscribe","method":"POST","json":{"uuid":"2f14da70-4289-11ea-8541-2bfc0b63bff1","host":"localhost","port":18088,"protocol":"http","path":"/get","type":"cdr","ttl":300,"node":"test-endpoint","gid":10},"headers":{"Auth-Token":"spFqzxzHAOBzriOfDYDesuKpyBYAQEhHUAOOmJctZRBOethpyRpFXrHtxjBZWDOLENKGOeBMXFygwZDQ"}}
API Server started 18088
REGISTER API ERROR: successfully created agent record
Maybe that last part shouldn't be an error :-)
Thanks for the help! I'll probably continue with hepsub-elastic because I need to query graylog.
from hepsub.
from hepsub.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hepsub.