Queries the update jobs for a specified firmware.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to ListOTAJobByFirmware.
FirmwareId String Yes The firmware ID. It is the unique identifier of the firmware.

The firmware ID is a response parameter that is returned by the CreateOTAFirmware operation.

You can call the ListOTAFirmware operation to check the response parameters for the firmware ID.

PageSize Integer Yes The number of update jobs to return on each page. Maximum value: 100.
CurrentPage Integer Yes The page number of the returned results to be displayed. The page number starts from 1.
IotInstanceId String No The ID of your IoT Platform instance. This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.
Common request parameters N/A Yes For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Description
RequestId String The globally unique ID that is generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. true indicates that the call was successful. false indicates that the call failed.
ErrorMessage String The error message returned if the call fails.
Code String The error code returned if the call fails. For more information about error codes, see Error codes.
Data List<SimpleOTAJobInfo> The job information returned when the call is successful. For more information, see the SimpleOTAJobInfo table.
Table 1. SimpleOTAJobInfo
Parameter Type Description
JobId String The ID of the update job. It is the unique identifier of the update job.
ProductKey String The unique identifier of the product to which the firmware belongs.
UtcCreate String The time when the job was created in UTC.
UtcModified String The time when the job was last modified in UTC.
UtcStartTime String The start time of the job in UTC.
UtcEndTime String The end time of the job in UTC.

This parameter is returned only for update jobs that are completed.

SelectionType String The update policy.
TargetSelection String The update scope.
  • ALL: update all the devices that meets the conditions.
  • SPECIFIC: update specified devices.
  • GRAY: phased update.
Note ALL is returned if the update job is created by calling the CreateOTADynamicUpgradeJob operation.
FirmwareId String The firmware ID.
JobStatus String The status of the job.
  • PLANNED: The job is being planned.

    The job is created, but the scheduled time has not arrived. This value is returned only for static update jobs that are scheduled.

  • IN_PROGRESS: The job is running.
  • COMPLETE: The job is completed.
  • CANCELED: The job is canceled.
JobType String The job type.
  • VERFIY_FIRMWARE: firmware verification job.
  • UPGRADE_FIRMWARE: firmware update job.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=ListOTAJobByFirmware
&DeviceName=testdevice
&ProductKey=a19mzPZ****
&FirmwareId=FJFx8JzpnhpIsKftRjjm03****
&PageSize=10
&CurrentPage=1
&Common request parameters

Sample success responses

  • JSON format
    {
      "PageCount": 1,
      "Data": {
        "SimpleOTAJobInfo": [{
          "SelectionType": "STATIC",
          "TargetSelection": "SPECIFIC",
          "JobType": "UPGRADE_FIRMWARE",
          "FirmwareId": "UfuxnwygsuSkVE0VCN****0100",
          "UtcStartTime": "2019-12-28T02:43:10.000Z",
          "UtcEndTime": "2019-12-29T02:43:10.000Z",
          "ProductKey": "a19mzPZ****",
          "JobId": "HvKuBpuk3rdk6E92CP****0200",
          "UtcModified": "2019-12-28T02:43:10.000Z",
          "JobStatus": "IN_PROGRESS",
          "UtcCreate": "2019-12-28T02:43:10.000Z"
        }]
      },
      "PageSize": 10,
      "RequestId": "5D58AC86-D5BF-4B39-834E-913E7F2C985D",
      "CurrentPage": 1,
      "Success": true,
      "Total": 1
    }
  • XML format
    <? xml version="1.0" encoding="utf-8"? >
    <ListOTAJobByFirmwareResponse>
      <PageCount>1</PageCount>
      <Data>
        <SimpleOTAJobInfo>
          <SelectionType>STATIC</SelectionType>
          <TargetSelection>SPECIFIC</TargetSelection>
          <JobType>UPGRADE_FIRMWARE</JobType>
          <FirmwareId>yLYuCqfqQNQ1JOqkDa****0100</FirmwareId>
          <UtcStartTime>2019-12-28T02:43:10.000Z</UtcStartTime>
          <UtcEndTime>2019-12-29T02:43:10.000Z</UtcEndTime>
          <ProductKey>a19mzPZ****</ProductKey>
          <JobId>HvKuBpuk3rdk6E92CP****0200</JobId>
          <UtcModified>2019-12-28T02:43:10.000Z</UtcModified>
          <JobStatus>IN_PROGRESS</JobStatus>
          <UtcCreate>2019-12-28T02:43:10.000Z</UtcCreate>
        </SimpleOTAJobInfo>
      </Data>
      <PageSize>10</PageSize>
      <RequestId>5D58AC86-D5BF-4B39-834E-913E7F2C985D</RequestId>
      <CurrentPage>1</CurrentPage>
      <Success>true</Success>
      <Total>1</Total>
    </ListOTAJobByFirmwareResponse>