You can add up to five custom headers
For instance, if you added a header named “Token” with value “
sdffsWED34sdfFG6wddV3”, the headers
sent by Efento Gateway would look like this:
Content-Type: application/json
charset=UTF-8
Token:
sdffsWED34sdfFG6wddV3
Please note, that the messages sent by the server to the gateway may not contain more than ten headers.
Any value above that, will be treated as wrong value and gateway will not accept this message.
API
Efento gateway supports two API versions “API v1” and “API v2”. API v1 is deprecated and should no longer
be used. API v2 specification:
ENDPOINT
/api/v2/measurements
(if user set other endpoint in “Custom API endpoint” field, measurements will be sent to
that endpoint)
METHOD
POST
HEADERS
Content-Type: application/json
charset=UTF-8
X-Api-Token:
<value of the “Token” field>
(if user set other headers in “Custom headers” section, user’s custom headers will be
added to the headers)
Http request body contains measurements in a JSON. One message can contain multiple measurements
from one sensor (e.g. if the gateway reestablished the Internet connection and it resends the data) or
measurements from multiple sensors - if there are few sensors in gateway’s range, gateway will send data
from multiple sensors in one message.
{
"
measurements
" : [
{