Paging query of sub-nodes under the current node

Last Updated on : 2023-06-15 04:49:36

Paging query of sub-nodes under the current node

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
asset_idStringuritrueAsset id
last_row_keyStringqueryfalseThe asset id of the last record
page_sizeIntegerquerytruePage size

Return parameter

Parameter nameTypeDescription
resultAssetPageListResponse

Description of result

Parameter nameTypeDescription
listListAsset result list
last_row_keyStringThe id of the last piece of data
page_sizeIntegerPage size
has_nextBooleanIs there a next page

Description of list

Parameter nameTypeDescription
asset_idStringAsset id
parent_asset_idStringParent ID, the top level is -1
asset_nameStringAsset Name
asset_full_nameStringFull asset name
levelIntegerAsset level, the root node is 0

Request example

GET: /v1.0/iot-02/assets/xxxid/sub-assets?last_row_key=aaa&page_size=20

Return example

{
    "list": [
        {
            "asset_id": "asset id",
            "asset_full_name": "asset full name",
            "asset_name": "asset name",
            "parent_asset_id": "parent ID, the top level is -1"
        }
    ],
    "has_next": true,
    "page_size": "Page size"
}

Error code

For more information, see error code.