Submit Data to Anedya
POSThttps://device.ap-in-1.anedya.io/v1/submitData
Devices can submit the data to this endpoint. You need to specify the authentication mode you want to use to access APIs by setting Auth-mode
header.
MQTT Topic
$anedya/device/{deviceid}/submitdata/json
Request
Responses
- 200
OK
Authorization: Auth-mode
name: Auth-modetype: apiKeyin: headerdescription: The value can be either `key` or `tls` depending on the requirement. If the value is `tls` the Authorization header is not mandatory. In case of TLS based authentication priority is given to client certificate and request fails if same can not be verified.
name: Authorizationtype: apiKeyin: headerdescription: This header is mandatory only if `Auth-mode` is set to `key` and should contain the node connection key. For TLS authentication this header is ignored
- curl
- nodejs
- python
- go
- rust
- csharp
- ruby
- php
- java
- powershell
- CURL
curl -L 'https://device.ap-in-1.anedya.io/v1/submitData' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Auth-mode: <Auth-mode>' \
-H 'Authorization: <Auth-mode>' \
-d '{
"data": [
{
"variable": "string",
"value": {
"lat": 0,
"long": 0
},
"timestamp": 0
}
]
}'
ResponseClear