REST API Reference

Method Endpoint Params Description
GET /devices   List all registered devices
POST /devices   Register new device
POST /devices/:id {"name": "x", "shared_with": "github_user1", "shadow": ...} Change device properties
DELETE /devices/:id   Delete device
POST /devices/:id/rpc/:func {...} Call device's RPC function
POST /devices/:id/ota fw.zip OTA: curl -v -F file=@fw.zip URL
GET /keys   List all API keys
POST /keys   Create an API key
DELETE /keys/:id   Delete an API key
POST /logs {"start": 0} Get stored notification logs

Example:

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
edit this doc