-
Notifications
You must be signed in to change notification settings - Fork 0
api.md
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 [email protected] 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.
ADS1X1X I2C ADS7843/XPT2046 SPI APDS9960 I2C ATCA BH1730 sensor BME280/BMP280 BQ27421 Barometers Bosch BM222 CCS811 I2C DHT DS3231 I2C Dallas RMT ESP32 touch sensor HTU21D(F) I2C ILI9341 SPI IMU INA219 I2C INA226 I2C INA3221 I2C Inventek ISM43xxx WiFi MAX7219 I2C MAX72xx LED matrix MCP23XXX I2C MCP9808 I2C MQ135 gas sensor Neopixel Onewire RMT PCF857X I2C SHT31 I2C SSD1306 OLED STMPE610 SPI Si7005 sensor Si7021 I2C TI TMP006 temp sensor VEML6075 I2C VFS (LittleFS) VFS (RAM) VFS (SPI NOR Flash) VFS (SPIFFS) VFS (Winbond W25XXX) VFS (another device) VFS (encryption) VFS bh1750 I2C
RPC core RPC loopback RPC over BLE GATT RPC over MQTT RPC over UART RPC over UDP Service - ATCA Service - Config Service - Cron Service - FS Service - GATT client Service - GPIO Service - I2C Service - OTA Service - WiFi