Get the List of Assets Authorized by Users

Last Updated on : 2023-06-15 04:59:05

Get the list of user-authorized assets by asset ID, and set search criteria to search for assets that are returned on pages.

API address

GET: /v1.0/iot-03/users/assets

Request parameter

Parameter name Type IN Required Description
parent_asset_id String query false The ID of the parent asset.
page_no Integer query false The page number. Query the first page if this parameter is not entered.
page_size Integer query false The number of items to be queried. Default value: 20.

Return parameter

Parameter name Type Description
result AuthAssetRes

Description of result

Parameter name Type Description
has_more Boolean Indicates whether additional data is available.
assets List The list of assets.
project_name String The project name.

Description of assets

Parameter name Type Description
asset_id String The asset ID.
asset_name String Asset Name
parent_asset_id String The ID of the parent asset.
permission String The permissions of a specified asset. Valid values: all: all permission. read: read-only permission.
current_asset_device_num Integer The number of devices under the specified asset.

Request example

GET: /v1.0/iot-03/users/assets?page_no=1&page_size=20&parent_asset_id=1373903144639023***

Return example

{ "result": { "project_name": "xxx", "assets": [ { "asset_id": "1373903144639082***", "asset_name": "Warehouse A" }, { "asset_id": "1373925660845707***", "asset_name": "Warehouse B" } ], "has_more": false }, "t": 1616467523570, "success": true }

Error code

For more information, see error code.