ListOTAUnfinishedTaskByDevice

Last Updated on : 2025-10-10 07:01:24Copy for LLMView as MarkdownDownload PDF

Query the unfinished device upgrade jobs for a specified device.

Request Parameters

Name Type Required Sample Values Description
Action String Yes ListOTAUnfinishedTaskByDevice System defined parameters. Value: and.
ModuleName String No Ble The OTA module name. ●When passed in, indicates that the upgrade task of the specified module is queried. ●If not, query the upgrade task of all modules.
TaskStatusList.N RepeatList No QUEUED Query multiple device upgrade jobs in the specified upgrade status. ●CONFIRM : To be confirmed. ●QUEUED : To be pushed. ●NOTIFIED : Pushed. ●IN_PROGRESS : Upgrading.
ProductKey String No K1nhvyl * * * * The ProductKey of the product to which the device belongs.
DeviceName String No Ble The device name.
TaskStatus String No CONFIRM Query device upgrade jobs in a specified upgrade status. ●CONFIRM : To be confirmed. ●QUEUED : To be pushed. ●NOTIFIED : Pushed. ●IN_PROGRESS : Upgrading.
IoTID String No And * * * * The device ID of the device to be queried.

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 Array of SimpleOTATaskInfo The upgrade job information returned when the call is successful. For details, see the following SimpleOTATaskInfo .
SimpleOTATaskInfo
DestVersion String 1.0.1 The target version of the upgrade.
DeviceName String Light The device name.
FirmwareID String 167 The upgrade package ID.
IoTID String And * * * * The ID issued by IoT platform for the device. The unique identifier of the device.
JobID String 183634077921266 * * * * The upgrade batch ID.
ModuleName String Ble The OTA module name.
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.
SrcVersion String 1.0.1 The original version of the device.
TaskID String 183634077949482 * * * * The ID of the device upgrade job.
TaskStatus String CONFIRM Device upgrade job status. ●CONFIRM : To be confirmed. ●QUEUED : To be pushed. ●NOTIFIED : Pushed. ●IN_PROGRESS : Upgrading.
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.
RequestID String A59D3BE1-E9A3-43F3-9B50-B7C8DE165D9B The unique identifier that IoT Platform generates for the request.
Success Boolean True Indicates whether the call succeeded. ●True : The call succeeded. ●False : The call failed.

Example

Request Example

curl 'https://si-d6e8******8958054.tuyacloud.com:8686/?Action=ListOTAUnfinishedTaskByDevice&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&ProductKey=k1nhvyl****&DeviceName=blelight1&TaskStatus=CONFIRM&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "data": {
        "simpleOTATaskInfo": [
            {
                "destVersion": "3.9.0",
                "deviceName": "device_actived",
                "firmwareId": "123",
                "iotId": "OZs5tjTkzRRTZSCekmbRk1****",
                "jobId": "183371207742901****",
                "moduleName": "ble",
                "productKey": "k1h9drZ****",
                "productName": "testProduct1",
                "srcVersion": "1.8",
                "taskId": "183371207782747****",
                "taskStatus": "NOTIFIED",
                "utcCreate": "2024-09-11T03:40:02.734Z",
                "utcModified": "2024-09-11T06:27:24.649Z"
            }
        ]
    },
    "requestId": "352b8d45-4544-45b2-9d79-b9b5e6640ce7",
    "success": true
}