English
English
简体中文
Contact Us
Register
Log In

Query Alerts of Environmental Indicators of Devices

Last Updated on : 2021-09-11 03:40:06download

Get the alerts of environmental indicators of devices under the specified asset by asset ID, and display the alert data on multiple pages.

API address

GET: /v1.0/iot-03/assets/{asset_id}/devices/environment-alarms

Request parameter

Parameter name Type IN Required Description
asset_id String uri true The asset ID.
last_row_key String query false The last row key.

Return parameter

Parameter name Type Description
result DeviceEnvironmentAlarmsRes

Description of result

Parameter name Type Description
asset_name String The asset name.
last_row_key String The row key of the last piece of data on each page.
has_next Boolean Specifies whether to return the next page.
devices List The list of devices.

Description of devices

Parameter name Type Description
device_id String The device ID.
status List The list of alert records.

Description of status

Parameter name Type Description
code String The code of a specified indicator.
value String The indicator values.
unit String The unit of the indicator values.

Request example

GET: /v1.0/iot-03/assets/19348832****/devices/environment-alarms?last_row_key=ad2fsw2dw

Return example

{ "result": { "last_row_key": "vdevo162676686854434", "alarms": [ { "device_id": "vdevo162676656009566", "status": [ { "code": "co2_value", "unit": "ppm", "value": "0" } ] }, { "device_id": "vdevo162676653996073", "status": [ { "code": "pm25_state", "value": "alarm" }, { "code": "co2_value", "unit": "ppm", "value": "0" } ] }, { "device_id": "vdevo162676653274517", "status": [ { "code": "co2_value", "unit": "ppm", "value": "0" } ] } ], "asset_name": "Office", "has_next": false }, "t": 1626834899280, "success": true }

Error code

For more information, see error code.