Get Details of Device Group Tasks

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

Get the details of the device group tasks by group ID.

API address

GET: /v1.0/iot-03/device-groups/{group_id}/tasks

Request parameter

Parameter name Type IN Required Description
group_id String uri true The group ID.
req GroupTaskQueryReq query false The query criteria.

Description of req

Parameter name Type IN Required Description
task_id String false The task ID. Default value: the ID of the latest task.

Return parameter

Parameter name Type Description
result GroupTaskStatusVO

Description of result

Parameter name Type Description
group_id String The group ID.
processing_status Integer Specifies the execution status of asynchronous tasks of the device group. Valid values:
  • 0: The device operation is in progress.
  • 1: The operation of all devices is successful.
  • 2: The operation of some devices is successful.
  • 3: The operation of all devices failed.
failure_devices List Te list of devices whose operation failed.

Description of failure_devices

Parameter name Type Description
device_id String The device ID.
op Integer The operation type. Valid values:
  • 0: Add a device to the group.
  • 1: Remove a device from the group.
reason String The failure reason.

Request example

GET: /v1.0/iot-03/device-groups/144779744804601****/tasks
{}

Return example

{ "result": { "failure_devices": [ { "op": 0, "reason": "SUB_DEVICE_TIMEOUT", "device_id": "vdevo1632553122****" }, { "op": 0, "reason": "SUB_DEVICE_TIMEOUT", "device_id": "vdevo1632553121****" }, { "op": 0, "reason": "SUB_DEVICE_TIMEOUT", "device_id": "vdevo1632553120****" }, { "op": 0, "reason": "SUB_DEVICE_TIMEOUT", "device_id": "vdevo1632553119****" } ], "group_id": "144779744804601****", "processing_status": 2 }, "t": 1633945074303, "success": true }

Error code

For more information, see error code.