Every API call must be authenticated by sending Authorization: Bearer KEY
HTTP header. Those API calls that use POST
or PUT
, should specify
application/json
mime type. Example - calling device's RPC function:
curl -H 'Content-Type: application/json' \
-H 'Authorization: Bearer API_KEY' \
-d '{"pin": 2}' \
https://dash.mongoose-os.com/api/v2/devices/DEVICE_ID/rpc/GPIO.Toggle
true
List all registered devices. Params: none.
Register new device. Params: none.
Change device properties. Params:
{
"name": "MyCoolDeviceName",
"shared_with": "github_user1,github_user2",
"shadow": ...
}
Any key in the params is optional.
Delete device. Params: none.
Call device's RPC function. Params: any valid JSON string, which is expected by the function.
Perform device OTA. Params: a binary content of the firmware .zip file. Example: curl -v -F file=@fw.zip URL
.
Get device saved data. Params: none.
List all API keys. Params: none.
Create an API key. Params: none.
Delete an API key. Params: none.
Get stored notification logs. Params: {"start": 0}
- an offset to start from.
Get data from all devices. Params: none.
edit this doc