CancelOTATaskByDevice

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

Cancels the device upgrade job in the pending confirmation, pending push, or pushed status under the specified OTA upgrade package.

Request Parameters

Name Type Required Sample Values Description
Action String Yes CancelOTATaskByDevice System defined parameters. Value: CancelOTATaskByDevice.
ProductKey String Yes K1nhvyl * * * * Of the product to which the device to be upgraded belongs ProductKey .
FirmwareID String Yes 167 The ID of the OTA upgrade package.
DeviceName.N RepeatList Yes Device1 The name of the device to cancel the upgrade.
JobID String No 183634077921266 * * * * The upgrade batch ID. If this parameter is specified, only the device upgrade task in the specified batch is canceled.

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.
ErrorMessage String System Exception Error information returned when the call fails.
RequestID String Kan The unique identifier that IoT Platform generates for the request.
Success Boolean True Whether the call was successful. ●True : The call is successful, indicating that the OTA upgrade package is successfully created. ●False : The call fails, indicating that the OTA upgrade package failed to be created.

Example

Request Example

curl 'https://si-d6e8d8******8958054.tuyacloud.com:8686/?Action=CancelOTATaskByDevice&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&FirmwareId=168&ProductKey=k1nhvyl****&DeviceName.1=testDevice1&DeviceName.2=testDevice2&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "requestId": "d2fce065-8238-4ee2-a793-0226f69b0542",
    "success": true
}