Queries the details of a specified update job.

Limits

The maximum number of queries per second (QPS) for a single Alibaba Cloud account to call this operation is 10. The quota is shared between the Alibaba Cloud account and RAM users.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to QueryOTAJob.
JobId String Yes The ID of the update job.

JobId is a response parameter that is returned by the CreateOTAVerifyJob, CreateOTAStaticUpgradeJob, or CreateOTADynamicUpgradeJob operation. You can also obtain the ID on the Firmware Details page of the IoT Platform console.

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 OTAJobInfo The update job information returned when the call is successful. For more information, see the following table OTAJobInfo.
Table 1. OTAJobInfo
Parameter Type Description
JobId String The ID of the update job. It is the unique identifier of the update job.
ProductName String The name of the product to which the firmware belongs.
ProductKey String The key 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.
  • VERIFY_FIRMWARE: firmware verification job.
  • UPGRADE_FIRMWARE: firmware update job.
TimeoutInMinutes String The timeout period for a device update. Unit: minutes.

This parameter is returned if the timeout period is set when you create the update job.

SrcVersions List<String> The list of firmware versions to be updated.
DestVersion String The version of the current firmware.
RetryInterval Integer The automatic retry interval after a device fails to be updated. Unit: minutes.

This parameter is returned if a retry policy is set when you create the update job.

RetryCount Integer The number of automatic retries after a device fails to be updated.

This parameter is returned if a retry policy is set when you create the update job.

MaximumPerMinute Integer The maximum number of devices to which the download URL for the firmware is pushed per minute.
GrayPercent String The phase ratio of the phased update.

This parameter is returned only when the update is set to be phased update.

Examples

Sample requests

https://iot.cn-shanghai.aliyuncs.com/?Action=QueryOTAJob
&JobId=wahVIzGkCMuAUE2gDERM02****
&Common request parameters

Sample success responses

  • JSON format
    {
      "Data": {
        "TimeoutInMinutes": 5,
        "JobDesc": "batch upgrade",
        "UtcStartTime": "2019-12-28T02:43:10.000Z",
        "UtcEndTime": "2019-12-29T02:43:10.000Z",
        "ProductKey": "a19mzPZ****",
        "UtcModified": "2019-12-28T02:43:10.000Z",
        "JobStatus": "IN_PROGRESS",
        "UtcCreate": "2019-12-28T02:43:10.000Z",
        "SelectionType": "STATIC",
        "TargetSelection": "SPECIFIC",
        "ProductName": "TestProduct",
        "JobType": "UPGRADE_FIRMWARE",
        "RetryInterval":60,
        "RetryCount":1,
        "MaximumPerMinute":1000,
        "SrcVersions": {
          "SrcVersion": ["1.0.0"]
        },
        "FirmwareId": "UfuxnwygsuSkVE0VCN****0100",
        "JobId": "HvKuBpuk3rdk6E92CP****0200",
        "DestVersion": "1.0.1"
      },
      "RequestId": "30F1BB8D-EDBF-44FD-BBC0-BE97DEA73991",
      "Success": true
    }
  • XML format
    <? xml version="1.0" encoding="utf-8"? >
    <QueryOTAJobResponse>
      <Data>
        <TimeoutInMinutes>5</TimeoutInMinutes>
        <JobDesc>batch upgrade</JobDesc>
        <UtcStartTime>2019-12-28T02:43:10.000Z</UtcStartTime>
        <UtcEndTime>2019-12-29T02:43:10.000Z</UtcEndTime>
        <ProductKey>a19mzPZ****</ProductKey>
        <UtcModified>2019-12-28T02:43:10.000Z</UtcModified>
        <JobStatus>IN_PROGRESS</JobStatus>
        <UtcCreate>2019-12-28T02:43:10.000Z</UtcCreate>
        <SelectionType>STATIC</SelectionType>
        <TargetSelection>SPECIFIC</TargetSelection>
        <ProductName>TestProduct</ProductName>
        <JobType>UPGRADE_FIRMWARE</JobType>
        <RetryInterval>60</RetryInterval>
        <RetryCount>1</RetryCount>
        <MaximumPerMinute>1000</MaximumPerMinute>
        <SrcVersions>
          <SrcVersion>1.0.0</SrcVersion>
        </SrcVersions>
        <FirmwareId>UfuxnwygsuSkVE0VCN****0100</FirmwareId>
        <JobId>HvKuBpuk3rdk6E92CP****0200</JobId>
        <DestVersion>1.0.1</DestVersion>
      </Data>
      <RequestId>A6EB16CD-F0C3-47A2-8112-AC7DFC022AC6</RequestId>
      <Success>true</Success>
    </QueryOTAJobResponse>