ListOTAJobByDevice

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

You can call this operation to obtain the upgrade batch list of the upgrade package to which the device belongs.

Request Parameters

Name Type Required Sample Values Description
Action String Yes ListOTAJobByDevice System defined parameters. Value: ListOTAJobByDevice.
CurrentPage Integer Yes 1 Displays the page number of the returned result. Returns the number of result pages sorted from 1.
DeviceName String Yes Ble1 The device name.
FirmwareID String Yes 194 The upgrade package ID. Unique identifier of the upgrade package.
PageSize Integer Yes 10 Specifies the number of upgrade packages displayed on each page in the returned results. The maximum limit is 100.
ProductKey String Yes K1nhvyl * * * * The ProductKey of the product to which the device belongs.

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 Tot.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 SimpleOTAJobInfo The batch information returned when the call is successful. For details, please see SimpleOTAJobInfo parameter under.
SimpleOTAJobInfo
FirmwareID String 176 The upgrade package ID.
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.
ProductKey String A19mzPZ * * * * The unique identifier of the product to which the upgrade package belongs.
TargetSelection String SPECIFIC Upgrade scope. ●ALL : Full upgrade. ●SPECIFIC : Directed upgrades. ●GRAY : Grayscale upgrade.
UtcCreate String 2019-12-28 T02:43:10.000Z The time when the batch is created, in UTC format.
UtcModified String 2019-12-28 T02:43:10.000Z The time when the batch 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 Kan The unique identifier that IoT Platform generates for the request.
Success Boolean True Whether the call was successful. ●True : The call succeeded. ●False : The call failed.
Total Integer 1 Total number of equipment upgrade jobs.

Example

Request Example

curl 'https://si-d6e8d8******958054.tuyacloud.com:8686/?Action=ListOTAJobByDevice&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&FirmwareId=187&ProductKey=k1nhvyl****&DeviceName=blelight&PageSize=10&CurrentPage=1&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "currentPage": 1,
    "data": {
        "simpleOTAJobInfo": [
            {
                "firmwareId": "125",
                "jobId": "183414358556252****",
                "jobStatus": "COMPLETED",
                "jobType": "UPGRADE_FIRMWARE",
                "productKey": "k1h9drZ****",
                "selectionType": "STATIC",
                "targetSelection": "SPECIFIC",
                "utcCreate": "2024-09-12T08:14:42.214Z",
                "utcModified": "2024-09-12T08:14:42.214Z"
            }
        ]
    },
    "pageCount": 1,
    "pageSize": 10,
    "requestId": "78159f9b-5b3c-446c-b51a-28d701f7de88",
    "success": true,
    "total": 1
}