The following examples are for HTTP devices (also called Generic or Direct in the documentation). Such
devices should be able to send HTTP requests directly to the Signomix API.
Depending on the implementation, a device of this type may ignore the received response or receive it and analyze it.
The content of the response may contain a command that the device can interpret accordingly.
API method addresses for HTTP devices fall into two groups, differing in how the request is interpreted:
/io
send data to be processed, and the response code results from the status (correctness) of the processing of this data.in
send data to be processed, but return a response before processing this data.Both types of addresses can return an error code if:
See also: Receiver API
Sending new data. If there is a pending command for this device, the contents of the command will be returned in the body of the response.
curl -X POST `cloud.localhost/api/receiver/io' \ } --header 'Content-Type: text/plain' } --header 'X-device-eui: DEVICE1' --header 'Authorization: 0000018e7558c3e6' --header 'X-data-separator: ;' --data-raw 'temperature=15.0;humidity=23.2' }
In case there are no commands waiting to be received.
HTTP/1.1 200 OK content-type: text/plain;charset=UTF-8 content-length: 0
In case there is a command waiting to be received, its content will be included about the response to the request. Interpretation of the content of the command depends on how this command was generated.
For more on this, see ....
HTTP/1.1 200 OK content-type: text/plain;charset=UTF-8 content-length: 32 eyJ0eXBlIjoiYiIsInZhbHVlIjoxfQ==