ListOTATaskByJob

Last Updated on : 2025-10-10 06:58:37Copy for LLMView as MarkdownDownload PDF

Query the list of equipment upgrade jobs in a specified upgrade batch.

Request Parameters

Name Type Tequired Sample Values Description
Action String Yes ListOTATaskByJob System defined parameters. Value: ListOTATaskByJob.
JobID String Yes 183634077921266 * * * * Upgrade batch ID, which is the unique identifier of the upgrade batch.
PageSize Integer No 10 Specifies the number of device upgrade Jobs displayed on each page in the returned results. Maximum limit: 100.
TaskStatus String No FAILED If this parameter is specified, the device upgrade job in the specified upgrade status is queried. ●CONFIRM : To be confirmed. ●QUEUED : To be pushed. ●NOTIFIED : Pushed. ●IN_PROGRESS : Upgrading. ●SUCCEEDED : Upgrade succeeded. ●FAILED : Upgrade failed. ●CANCELED : Cancelled. If this parameter is not specified, all equipment upgrade jobs in the specified upgrade batch are queried.
CurrentPage Integer No 1 Specifies the page number in the returned results. Pages are sorted from 1.
DeviceNames.N RepeatList No Device1 Specifies the list of device names to query.

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.
CurrentPage Integer 1 The current page number.
Data Array of SimpleOTATaskInfo The device upgrade job information returned when the call is successful.
SimpleOTATaskInfo
DestVersion String 1.0.1 The target OTA upgrade package version.
DeviceName String Device2 The device name.
FirmwareID String 167 The upgrade package ID.
IotID String And * * * * The device ID.
JobID String 183634077921266 * * * * The upgrade batch ID.
ProductKey String K1nhvyl * * * * The ProductKey of the product to which the device belongs.
ProductName String Product1 The name of the product to which the device belongs.
Progress String 50 The current upgrade progress.
SrcVersion String 1.0.0 The original firmware version of the device.
TaskDesc String Test task desc Upgrade job description information. When the device upgrade times out or the upgrade job is canceled, this parameter carries specific error information.
TaskID String 183634077921266 * * * * The ID of the device upgrade job.
TaskStatus String FAILED Device upgrade status. ●CONFIRM : To be confirmed. ●QUEUED : To be pushed. ●NOTIFIED : Pushed. ●IN_PROGRESS : Upgrading. ●SUCCEEDED : Upgrade succeeded. ●FAILED : Upgrade failed. ●CANCELED : Cancelled.
Timeout String 1440 The device upgrade timeout time, in minutes.
UtcCreate String 2024-11-11 T11:11:11.000Z The time when the upgrade job is created, in UTC format.
UtcModified String 2024-11-11 T11:11:11.000Z The time when the upgrade job was last modified, in UTC format.
ErrorMessage String System Exception Error information returned when the call fails.
PageCount Integer 1 Total number of pages.
PageSize Integer 10 Number of device upgrade Jobs displayed per page.
RequestId String A59D3BE1-E9A3-43F3-9B50-B7C8DE165D9B The unique identifier generated by Alibaba Cloud for this request.
Success Boolean True Indicates whether the call succeeded. ●True : The call succeeded. ●False : The call failed.
Total Integer 2 Total number of equipment upgrade jobs.

Example

Request Example

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

Normal Return Example

{
    "code": "",
    "currentPage": 1,
    "data": {
        "simpleOTATaskInfo": [
            {
                "destVersion": "1.2.3",
                "deviceName": "device_actived",
                "firmwareId": "136",
                "iotId": "OZs5tjTkzRRTZSCekmbRk1****",
                "jobId": "183634077921266****",
                "productKey": "k1h9drZ****",
                "srcVersion": "0.0.0",
                "taskDesc": "fix device ota module",
                "taskId": "18363407798669****",
                "taskStatus": "FAILED",
                "timeout": "5",
                "utcCreate": "2024-09-18T09:45:34.139Z",
                "utcModified": "2024-09-18T09:45:34.148Z"
            }
        ]
    },
    "pageCount": 1,
    "pageSize": 10,
    "requestId": "fe273c87-abc9-483f-bd63-e9876d594cd3",
    "success": true,
    "total": 1
}