Query Scene Template Application List

Last Updated on : 2021-11-26 02:54:47download

Query the application list of scene templates, which can be filtered by scene template ID, asset ID or application status. The result can be displayed on pages.

API address

GET: /v1.0/iot-03/scene-templates/assets/apply-details

Request parameter

Parameter name Type IN Required Description
req ApplyDetailListReq query false The query criteria.

Description of req

Parameter name Type IN Required Description
page_no Integer false The page number.
page_size Integer false The number of items returned on each page.
template_id Long false The ID of a specified scene template.
asset_ids String false The IDs of specified assets.
apply_status Integer false The application status. Valid values:
  • 0: The template is not applied.
  • 1: Failed to apply the template.
  • 2: The template is applied successfully.

Return parameter

Parameter name Type Description
result ApplyDetailListRes The returned result.

Description of result

Parameter name Type Description
page_no Integer The page number.
page_size Integer The number of items returned on each page.
data List The list of data.
total Integer The total number of items to be returned.

Description of data

Parameter name Type Description
template_id String The ID of a specified scene template.
template_name String The name of a specified scene template.
asset_id String The IDs of specified assets.
asset_name String The name of a specified asset.
apply_status String The application status. Valid values:
  • 0: The template is not applied.
  • 1: Failed to apply the template.
  • 2: The template is applied successfully.
automation_id String The generated automation ID.
create_time Long The time when it is created.
update_time Long The time when it is updated.
id Long The ID of a specified scene template.

Request example

GET: /v1.0/iot-03/scene-templates/assets/apply-details

Return example

{ "result": { "data": [ { "create_time": 1636461287049, "apply_status": 2, "asset_id": "142788436946849****", "automation_id": "OOtNq81NfTt1****", "template_name": "template****", "update_time": 1636597535273, "asset_name": "asset****", "template_id": 189, "id": 14580504325 }, { "create_time": 1636458449206, "apply_status": 1, "asset_id": "142067908365368****", "automation_id": "", "template_name": "template****", "update_time": 1636458505278, "asset_name": "asset****", "template_id": 189, "id": 14580385297 } ], "page_no": 1, "total": 100, "page_size": 20 }, "t": 1636599879377, "success": true }

Error code

For more information, see error code.