CreateOTAVerifyJob

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

Create an OTA upgrade package verification task.

Request Parameters

Name Type Required Sample Values Description
Action String Yes CreateOTAVerifyJob System defined parameters. Value: CreateOTAVerifyJob.
FirmwareID String Yes 178 The upgrade package ID, which is the unique identifier of the upgrade package.
ProductKey String Yes K1nhvyl * * * * Of the product to which the upgrade package belongs ProductKey .
TimeoutInMinutes Integer No 1440 The device upgrade timeout period. If the device does not complete the upgrade, the upgrade fails. The unit is minutes, and the value range is 1~1,440. If this parameter is not specified, there is no timeout limit for device upgrade.
TargetDeviceName.N RepeatList No DeviceName List of device names for the targeted upgrade.
NeedPush Boolean No True Whether the IoT platform actively pushes upgrade tasks to devices. ●True (Default): Yes. After the batch task is created, IoT Platform directly pushes the upgrade task to the online devices within the scope of the upgrade. In this case, the device can still initiate a request to IoT platform to obtain OTA upgrade task information. ●False : No. The device must request the IoT platform to obtain the OTA upgrade task information.
NeedConfirm Boolean No False If you need to autonomously control the device OTA upgrade, you can configure this parameter and use the mobile phone App to control whether the device can be upgraded OTA. Mobile App needs to be developed by yourself. ●False (Default): No. Directly in accordance NeedPush setting to obtain OTA upgrade task information. ●True : Yes. The device cannot obtain the OTA upgrade task. The App side must confirm the OTA upgrade before following NeedPush setting to obtain OTA upgrade task information.
DownloadProtocol String No Https Upgrade package download protocol, currently only available: Https . After receiving the upgrade package download information pushed by the IoT platform, the device downloads the upgrade package through the protocol.

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 Data parameter description.
JobID String 183634077921266 * * * * Ota upgrade package verification task ID.
UtcCreate String 2024-11-11 T11:21:54.607Z The creation time of the OTA upgrade package verification task, in UTC format.
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-d6e8******8054.tuyacloud.com:8686/?Action=CreateOTAVerifyJob&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&FirmwareId=167&ProductKey=k1nhvyl****&TimeoutInMinutes=1440&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "data": {
        "firmwareId": "183634077921266****",
        "utcCreate": "2024-11-20T08:50:00.239Z"
    },
    "requestId": "d2fce065-8238-4ee2-a793-0226f69b0542",
    "success": true
}