Devices

Get List of Devices

Changed on

Every 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.

WhereNameRequiredValue
Headerx-api-keyYesYour developer API key.
HeaderAuthorizationYesBearer <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" }
        ]
      }
    ]
  }
}
FieldTypeMeaning
device_idstringThe identifier used by every other endpoint.
namestringThe name given to the device in the Atomberg Home app.
seriesstringHardware series. It decides which commands the device accepts.
modelstringMarketing model name.
colorstringColour or finish, as registered.
roomstringThe room the device is assigned to in the app.
device_typestringThe type of device, based on its series: fan, water_purifier or lock.
metadataobjectRegistration details. Contents vary by device and may be empty.
supported_commandsarrayThe commands this device accepts and the values for each.

Each entry in supported_commands looks like this:

FieldTypeMeaning
commandstringThe key to send inside command on 'Send Command'.
acceptsstringThe values that key takes, in words.
requiresarrayOther keys that must be sent in the same message.
sub_key_ofstringShown 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.

get/get_list_of_devices

Request

  • Base URL
    https://api.developer.atomberg-iot.com/v2
  • Auth
    API key in header x-api-key and HTTP bearer

Response

OK

statusstring

Success on a 2xx, Error otherwise.

Example response

{
  "status": "Success",
  "message": {
    "devices_list": [
      {
        "series": "I1",
        "model": "aris",
        "supported_commands": [
          {
            "command": "speed",
            "accepts": "an integer from 1 to 6"
          }
        ]
      }
    ]
  }
}

Changes