Queries uncompleted update tasks of a specified device.

Limits

Each Alibaba Cloud account can run a maximum of 10 queries per second (QPS).

Note RAM users of an Alibaba Cloud account share the quota of the account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListOTAUnfinishedTaskByDevice

The operation that you want to perform. Set the value to ListOTAUnfinishedTaskByDevice.

TaskStatus String Yes CONFIRM

The status of the update task.

  • CONFIRM: The update task is pending confirmation.
  • QUEUED: The update notification is to be pushed.
  • NOTIFIED: The update notification is pushed to the device.
  • IN_PROGRESS: The update task is in progress.
IotInstanceId String No iot-c3j***

The ID of the instance.

You do not need to specify this parameter.

ModuleName String No WifiConfigModify

The name of the OTA module.

  • If you specify this parameter, update tasks of the specified module are queried.
  • If you do not specify this parameter, update tasks of all modules are queried.
ProductKey String No a19mzPZ****

The ProductKey of the product to which the device belongs.

Notice If you specify this parameter, you must also specify the DeviceName parameter.
DeviceName String No light

The DeviceName of the device.

Notice If you specify this parameter, you must also specify the ProductKey parameter.
IotId String No TfmUAeJjQQhCPH84UVNn0010c6****

The ID of the device.

Notice If you specify this parameter, you do not need to specify ProductKey or DeviceName. The IotId parameter specifies a globally unique identifier (GUID) of the device, which corresponds to a combination of ProductKey and DeviceName. If you specify both IotId and the combination of ProductKey and DeviceName, IotId takes precedence.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String iot.system.SystemException

The error code returned if the call fails. For more information, see Error codes.

Data Array of SimpleOTATaskInfo

The update task information returned if the call is successful. For more information, see the following SimpleOTATaskInfo.

SimpleOTATaskInfo
DestVersion String 1.0.1

The firmware version after the update.

DeviceName String light

The DeviceName of the device.

FirmwareId String q3j9OYBjUAZMv1hlMgdo03****

The ID of the update package.

IotId String nadRdeffljdEndlfadgadfse****

The ID of the device. The ID is a unique identifier that is issued by IoT Platform to the device.

JobId String 7glPHmaDYLAYMD1HHutT02****

The ID of the update batch.

ModuleName String WifiConfigModify

The name of the OTA module.

ProductKey String a1GUfrM****

The ProductKey of the product to which the device belongs.

ProductName String MyProduct

The name of the product to which the device belongs.

SrcVersion String 1.0.0

The firmware version before the update.

TaskId String y3tOmCDNgpR8F9jnVEzC01****

The ID of the update task.

TaskStatus String CONFIRM

The status of the update task.

  • CONFIRM: The update task is pending confirmation.
  • QUEUED: The update notification is to be pushed.
  • NOTIFIED: The update notification is pushed to the device.
  • IN_PROGRESS: The update task is in progress.
UtcCreate String 2019-11-04T03:38:22.000Z

The time when the update task was created. The time is displayed in UTC.

UtcModified String 2021-11-04T03:38:22.000Z

The time when the update task was last modified. The time is displayed in UTC.

ErrorMessage String A system exception occurred.

The error message returned if the call fails.

RequestId String A59D3BE1-E9A3-43F3-9B50-B7C8DE165D9B

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://iot.cn-shanghai.aliyuncs.com/?Action=ListOTAUnfinishedTaskByDevice
&ProductKey=a19mzPZ****
&DeviceName=light
&TaskStatus=CONFIRM
&<Common request parameters>

Sample success responses

XML format

<ListOTAUnfinishedTaskByDevice>
  <Data>
        <SimpleOTATaskInfo>
              <SrcVersion>1.0.0</SrcVersion>
              <DeviceName>testDevice1</DeviceName>
              <FirmwareId>q3j9OYBjUAZMv1hlMgdo03****</FirmwareId>
              <IotId>SR8FiTu1R9tlUR2V1bmi00105****</IotId>
              <ProductKey>a1GUfrM****</ProductKey>
              <JobId>7glPHmaDYLAYMD1HHutT02****</JobId>
              <DestVersion>1.0.1</DestVersion>
              <UtcCreate>2019-11-04T03:38:15.000Z</UtcCreate>
              <UtcModified>2019-11-04T03:38:15.000Z</UtcModified>
              <TaskStatus>QUEUED</TaskStatus>
              <ProductName>MyProduct</ProductName>
              <TaskId>y3tOmCDNgpR8F9jnVEzC01****</TaskId>
              <ModuleName>WifiConfigModify</ModuleName>
        </SimpleOTATaskInfo>
        <SimpleOTATaskInfo>
              <SrcVersion>1.0.0</SrcVersion>
              <DeviceName>testDevice2</DeviceName>
              <FirmwareId>q3j9OYBjUAZMv1hlMgdo03****</FirmwareId>
              <IotId>nadRdeffljdEndlfadgadfse****</IotId>
              <ProductKey>a1GUfrM****</ProductKey>
              <JobId>7glPHmaDYLAYMD1HHutT02****</JobId>
              <DestVersion>1.0.1</DestVersion>
              <UtcCreate>2019-11-04T03:38:22.000Z</UtcCreate>
              <UtcModified>2019-11-04T03:38:22.000Z</UtcModified>
              <TaskStatus>CONFIRM</TaskStatus>
              <ProductName>MyProduct</ProductName>
              <TaskId>ZS9sNBb1ahsu6khqr9II01****</TaskId>
              <ModuleName>ConfigModify</ModuleName>
        </SimpleOTATaskInfo>
  </Data>
  <RequestId>A59D3BE1-E9A3-43F3-9B50-B7C8DE165D9B</RequestId>
  <Success>true</Success>
</ListOTAUnfinishedTaskByDevice>

JSON format

{
  "Data": {
    "SimpleOTATaskInfo": [{
      "SrcVersion": "1.0.0",
      "DeviceName": "testDevice1",
      "FirmwareId": "q3j9OYBjUAZMv1hlMgdo03****",
      "IotId": "SR8FiTu1R9tlUR2V1bmi00105****",
      "ProductKey": "a1GUfrM****",
      "JobId": "7glPHmaDYLAYMD1HHutT02****",
      "DestVersion": "1.0.1",
      "UtcCreate": "2019-11-04T03:38:15.000Z",
      "UtcModified": "2019-11-04T03:38:15.000Z",
      "TaskStatus": "QUEUED",
      "ProductName": "MyProduct",
      "TaskId": "y3tOmCDNgpR8F9jnVEzC01****",
      "ModuleName": "WifiConfigModify"
    }, {
      "SrcVersion": "1.0.0",
      "DeviceName": "testDevice2",
      "FirmwareId": "q3j9OYBjUAZMv1hlMgdo03****",
      "IotId": "nadRdeffljdEndlfadgadfse****",
      "ProductKey": "a1GUfrM****",
      "JobId": "7glPHmaDYLAYMD1HHutT02****",
      "DestVersion": "1.0.1",
      "UtcCreate": "2019-11-04T03:38:22.000Z",
      "UtcModified": "2019-11-04T03:38:22.000Z",
      "TaskStatus": "CONFIRM",
      "ProductName": "MyProduct",
      "TaskId": "ZS9sNBb1ahsu6khqr9II01****",
      "ModuleName": "ConfigModify"
    }]
  },
  "RequestId": "A59D3BE1-E9A3-43F3-9B50-B7C8DE165D9B",
  "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.