Query Group Devices

Last Updated on : 2024-06-29 02:35:00download

Query devices in the specified group based on the group ID.

API address

GET: /v2.1/cloud/thing/group/{group_id}/devices

Request parameter

Parameter nameTypeINRequiredDescription
group_idLongpathtrueThe group ID.
page_noIntegerquerytrueThe current page number.
page_sizeIntegerquerytrueThe number of entries to be returned per page.

Return parameter

Parameter nameTypeDescription
resultJsonObjectThe returned result of the specified group.
successBooleanIndicates whether the API is called successfully. Valid values:
  • true: The API call succeeded.
  • false: The API call failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
data_listListThe list of data.
countIntegerThe total number of returned entries.
page_sizeIntegerThe number of entries to be returned per page.
page_noIntegerThe current page number.

Description of data_list

Parameter nameTypeDescription
group_idLongThe group ID.
device_idStringThe device ID.
create_timeLongThe time when the relationship between the group and the device is established.
update_timeLongThe time when the relationship between the group and the device is updated.

Request example

GET: /v2.1/cloud/thing/group/1393****/devices?page_no=1&page_size=10

Return example

{
    "tid": "e4d2d4b1022111efbe7a366d87620758",
    "result": {
        "data_list": [
            {
                "create_time": 1713944885103,
                "device_id": "vdevo17059963185****",
                "update_time": 1713944885103,
                "group_id": "1393****"
            },
            {
                "create_time": 1713949980073,
                "device_id": "vdevo17059988536****",
                "update_time": 1713949980073,
                "group_id": "1393****"
            },
            {
                "create_time": 1713944885355,
                "device_id": "vdevo17059963113****",
                "update_time": 1713944885355,
                "group_id": "1393****"
            }
        ],
        "count": 3,
        "page_no": 1,
        "page_size": 10
    },
    "t": 1713953006944,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.