QueryOTAJob

Last Updated on : 2025-10-10 06:57:27Copy for LLMView as MarkdownDownload PDF

Query the details of a specified upgrade batch.

Request Parameters

Name Type Required Sample Values Description
Action String Yes QueryOTAJob System defined parameters. Value: QueryOTAJob.
JobID String Yes 183634077921266 * * * * The upgrade batch ID.

Note: When calling an API, in addition to the API-specific request parameters described in this topic, you must also pass in the common request parameters. For more information about common request parameters, see Common parameters.

Return Data

Name Type Sample Values Description
Code String Iot.system.SystemException The error code returned when the call fails. For more information, see Error codes.
Data Struct The upgrade batch information returned when the call is successful. For more information, see the parameters included in the following Data.
DestVersion String 1.0.1 The upgrade target version number.
DownloadProtocol String Https The download protocol of the upgrade package file.
FirmwareID String 167 The upgrade package ID.
GrayPercent String 50 The proportion of grayscale upgrades. This parameter is returned only when the upgrade range is grayscale upgrade.
GroupID String 18873 * * * The device group ID of the group upgrade.
GroupName String Test The name of the device group for group upgrade.
JobDesc String Batch Upgrade Upgrade batch description.
JobID String 183634077921266 * * * * Upgrade batch ID, the unique identifier of the batch.
JobStatus String IN_PROGRESS The status of the batch. ●PLANNED : Planned. The batch has been created, but the scheduled time has not expired. Only batches that are scheduled for static upgrades may return this value. ●IN_PROGRESS : in execution. ●COMPLETED : Completed. ●CANCELED : Cancelled.
JobType String UPGRADE_FIRMWARE Batch type. ●VERIFY_FIRMWARE : Upgrade package validation batch. ●UPGRADE_FIRMWARE : Bulk upgrade batch.
Name String Firmware Name of the upgrade package.
NeedConfirm Boolean False Ehether the App confirms the upgrade.
NeedPush Boolean True Ehether the IoT platform actively pushes upgrade tasks to devices.
ProductKey String A19mzPZ * * * * The ProductKey of the product to which the upgrade package belongs.
RetryCount Integer 1 The number of automatic retries after the device upgrade fails. This parameter is returned if the failure retry policy is set when creating an upgrade batch.
RetryInterval Integer 60 The Automatic Retry interval after the device upgrade fails. Unit: minutes. This parameter is returned if the failure retry policy is set when creating an upgrade batch.
SrcVersions List {"SrcVersion": ["1.0.0"]} List of version numbers to be upgraded.
TargetSelection String ALL Upgrade scope. ●ALL : Full upgrade. ●SPECIFIC : Directed upgrades. ●GRAY : Grayscale upgrade.
TimeoutInMinutes Integer 5 The device upgrade timeout time, in minutes. This parameter is returned if the timeout period is set when the upgrade batch is created.
UtcCreate String 2024-11-11 T11:11:11.000Z The time when the batch is created, in UTC format.
UtcModified String 2024-11-11 T11:11:11.000Z The time when the batch was last modified, in UTC format.
ErrorMessage String System Exception Error information returned when the call fails.
RequestID String Kan The unique identifier generated by Alibaba Cloud for this request.
Success Boolean True Whether the call was successful. ●True : The call succeeded. ●False : The call failed.

Example

Request Example

curl 'https://si-d6e8d81******958054.tuyacloud.com:8686/?Action=QueryOTAJob&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&JobId=183634077921266****&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "data": {
        "destVersion": "2.8",
        "downloadProtocol": "HTTPS",
        "firmwareId": "126",
        "grayPercent": "10",
        "jobId": "183415776199966****",
        "jobStatus": "COMPLETED",
        "jobType": "UPGRADE_FIRMWARE",
        "name": "Test",
        "needConfirm": false,
        "needPush": true,
        "overwriteMode": 0,
        "productKey": "k1h9drZ****",
        "retryCount": 1,
        "retryInterval": 61,
        "selectionType": "STATIC",
        "targetSelection": "GRAY",
        "timeoutInMinutes": 1,
        "utcCreate": "2024-09-12T09:11:02.131Z",
        "utcModified": "2024-09-12T09:11:02.131Z"
    },
    "requestId": "f7d5db8c-df95-4c9b-96af-2273ae7fb457",
    "success": true
}