Part 3. Cloud API: APP Service APIs

DeviceMode Endpoints

Click an API endpoint to expand/collapse its content.
GET/device-modes/account/:account_id
Purpose: Gets the list of DeviceModes according to the account_id.
Request Method
GET
APIs Type
Administrative Functions for Account and Permissions Management.
Changelog
Nov 11, 2017 First version
Dec 21, 2017 Second version
Permission
Must verify that the app_id and app_key of the Header belong to the App to take further actions.
Request Parameters
Need Parameter Type Description
Required account_id String The account_id to search the DeviceMode.
Return Values (JSON)
Fields Type Description
time_used Integer The time the request takes (time unit: millisecond).
devicemodes Object with Array Get the list of DeviceMode.
Return Values in the DeviceModes Array
Fields Type Description
devicemode_id String The ID number of the DeviceMode.
devicemode_parent_id String The parent_id of the DeviceMode.
  • Number 0 represents the first entry.
devicemode_name String The name of the DeviceMode.
devicemode_child Array The list of the Sub-DeviceMode.
Sample Response
Sample response when a request has succeeded:
{
  "time_used": 752,
  "devicemodes": [{
    "devicemode_id": "c92be72d-40fc-462f-ae52-9e997e514277",
    "devicemode_parent_id": "c92be72d-40fc-462f-ae52-9e997e514277",
    "devicemode_name": "baby room",
    "devicemode_child": [{
      "devicemode_id":  "c92be72d-40fc-462f-ae52-9e997e514277",
      "devicemode_parent_id": "c92be72d-40fc-462f-ae52-9e997e514277",
      "devicemode_name": "baby room2"
    }]
  }]
}
Unique Error Message of this API
HTTP Status Code Error Message Description
400 INVALID_ACCOUNT_ID account_id does not exist.

▲ Top