Get List of Devices
Changed onEvery Wi-Fi connected device on your account, with the commands each one accepts.
supported_commands is built from the same rules the API uses to check commands, so it always matches what the API accepts. Reading it is better than hard-coding a list of commands.
Request
No query parameters and no request body. Only the two headers below.
| Where | Name | Required | Value |
|---|---|---|---|
| Header | x-api-key | Yes | Your developer API key. |
| Header | Authorization | Yes | Bearer <access_token> |
Response
Returns every Wi-Fi connected device on your account, in all your homes. This includes fans, water purifiers and smart locks. Use device_type to tell them apart.
A lock has device_type: "lock" and an empty supported_commands list, because locks do not accept commands through this API. Use a lock's device_id with 'Get Device State' and 'Get Lock Dynamic PIN'.
{
"status": "Success",
"message": {
"devices_list": [
{
"device_id": "6867258b9d78",
"name": "Bedroom Fan",
"series": "I1",
"model": "Aris Starlight",
"color": "Sand White",
"room": "Bedroom",
"device_type": "fan",
"metadata": {},
"supported_commands": [
{ "command": "power", "accepts": "true or false" },
{ "command": "speed", "accepts": "an integer from 1 to 6" },
{ "command": "sleep", "accepts": "true or false" }
]
},
{
"device_id": "a0764ee4210c",
"name": "Kitchen Purifier",
"series": "W2",
"model": "Intellon",
"room": "Kitchen",
"device_type": "water_purifier",
"metadata": {},
"supported_commands": [
{ "command": "mode", "accepts": "one of 0, 1, 2, 3, 4, 10" },
{ "command": "fallback_mode", "accepts": "one of 0, 2, 3, 4" },
{ "command": "tds_threshold", "accepts": "an integer from 100 to 300" },
{ "command": "idle_sleep", "accepts": "one of 0, 1" },
{ "command": "sleep_mode", "accepts": "one of 0, 1", "requires": ["start_utc", "stop_utc"] },
{ "command": "start_utc", "accepts": "an integer from 0 to 4294967295", "sub_key_of": "sleep_mode" },
{ "command": "stop_utc", "accepts": "an integer from 0 to 4294967295", "sub_key_of": "sleep_mode" }
]
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
| device_id | string | The identifier used by every other endpoint. |
| name | string | The name given to the device in the Atomberg Home app. |
| series | string | Hardware series. It decides which commands the device accepts. |
| model | string | Marketing model name. |
| color | string | Colour or finish, as registered. |
| room | string | The room the device is assigned to in the app. |
| device_type | string | The type of device, based on its series: fan, water_purifier or lock. |
| metadata | object | Registration details. Contents vary by device and may be empty. |
| supported_commands | array | The commands this device accepts and the values for each. |
Each entry in supported_commands looks like this:
| Field | Type | Meaning |
|---|---|---|
| command | string | The key to send inside command on 'Send Command'. |
| accepts | string | The values that key takes, in words. |
| requires | array | Other keys that must be sent in the same message. |
| sub_key_of | string | Shown when the key can only be sent together with another key. |
In the example above, sleep_mode has requires set to start_utc and stop_utc, and both of them have sub_key_of: "sleep_mode". This means you send start_utc and stop_utc in the same message as sleep_mode set to 1. See "Sleep window sub-keys" under 'Send Command'.
Use supported_commands instead of your own list. When a firmware update adds a feature, it appears here. New devices also work without any change to your code.
Fields other than device_id and series come from when the device was registered, so an older device may have fewer of them. Your code should handle missing fields.
Request
- Base URLhttps://api.developer.atomberg-iot.com/v2
- AuthAPI key in header x-api-key and HTTP bearer
Response
OK
Example response
{
"status": "Success",
"message": {
"devices_list": [
{
"series": "I1",
"model": "aris",
"supported_commands": [
{
"command": "speed",
"accepts": "an integer from 1 to 6"
}
]
}
]
}
}Changes
- info
endpoint added
- info