Query Node Devices in Pages

Last Updated on : 2023-06-20 15:18:42download

Query node devices on pages.

API address

GET: /v1.0/iot-02/assets/{asset_id}/devices

Request parameter

Parameter nameTypeINRequiredDescription
asset_idStringuritrueThe asset ID.
last_row_keyStringqueryfalseThe row key of the last piece of data on each page.
page_sizeIntegerquerytrueThe number of entries returned per page.

Return parameter

Parameter nameTypeDescription
resultDevicePageListResponse

Description of result

Parameter nameTypeDescription
listListThe list of device response objects in the asset.
last_row_keyStringThe row key of the last piece of data on each page.
total_sizeIntegerThe total number of returned entries.
page_sizeIntegerThe number of entries returned per page.
has_nextBooleanSpecifies whether to return the next page.

Description of list

Parameter nameTypeDescription
device_idStringThe device ID.
asset_idStringThe asset ID.
asset_nameStringThe asset name.

Request example

GET: /v1.0/iot-02/assets/1374932xxxxx62114/devices?last_row_key=&page_size=10

Return example

{
    "result": {
        "last_row_key": "1374932xxxxx62114",
        "list": [
            {
                "device_id": "6c33579xxxx3d34vjan",
                "asset_id": "1374932xxxxx62114",
                "asset_name": "Asset xxx"
            }
        ],
        "has_next": true,
        "page_size": 10
    },
    "t": 1616644441044,
    "success": true
}

Error code

For more information, see error code.