To push data into 1Gateway, use http POST requests to the /ws/rest/send endpoint, specifying an API token on the url.
Method
POST
Request
http://localhost:8090/ws/rest/send?token=
Body
{
"element" : "myelement",
"source" : "MyPC",
"value" : 42,
"ts" : 1522831644,
"type" : "ExternalMetric"
}
CODE
The body needs to be JSON and will be parsed as one message. A mapper can be used to normalize it.
For each User an
API token is generated. The API token is needed for some plugin configurations. Follow the steps below to access the API token.
- Choose the option "My Account" in the Account Menu
- Copy the API Code and past it wherever you will need it