Query Energy-Consuming Devices in Space

Last Updated on : 2023-06-21 07:13:07download

Query the list of energy-consuming devices in the space.

API address

GET: /v1.0/iot-03/energy/{energy_type}/space/devices

Request parameter

Parameter name Type IN Required Description
energy_type String uri true The energy type. Set the value to electricity.
space_id String query false The ID of a specified space.
page_no Integer query true The current page number.
page_size Integer query true The number of items returned on each page. Valid values: 1 to 200.

Return parameter

Parameter name Type Description
result PageRsp

Description of result

Parameter name Type Description
total Long The total number of entries.
datas List The device list.
has_more Boolean Specifies whether to return the next page.

Request example

GET: /v1.0/iot-03/energy/electricity/space/devices
{ "devices": [ "xxx" ] }

Return example

{ "result": { "datas": [ "xxx" ], "total": 1, "has_more": false }, "t": 1632464352417, "success": true }

Error code

For more information, see error code.