QueryOTAFirmware

Last Updated on : 2025-10-10 06:55:43Copy for LLMView as MarkdownDownload PDF

Queries the details of a specified OTA upgrade package.

Request Parameters

Name Type Required Sample Values Description
Action String Yes QueryOTAFirmware System defined parameters. Value: QueryOTAFirmware.
FirmwareID String Yes 167 Ota upgrade package ID, the unique identifier of the upgrade package.

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.
FirmwareInfo Struct The upgrade package information returned when the call is successful. See below for details FirmwareInfo the included parameters.
DestVersion String 1.0.0 The version number of the current OTA upgrade package.
FirmwareDesc String Ble firmware Description of the OTA upgrade package.
FirmwareID String 158 OTA upgrade package ID, the unique identifier of the upgrade package.
FirmwareName String T3q5rkNm The name of the OTA upgrade package.
FirmwareSign String 3 * * * * The signature value of the OTA upgrade package.
FirmwareSize Integer 1421 The size of the OTA upgrade package file, in bytes.
FirmwareUrl String Https://oss-612ba0f1-2e08-4adb-9606-78390169****.oss-cn-hangzhou.aliyuncs.com/ota/firmware/bd65da39-cf24-4d9c-b306-6ac14ff5****.bin what? Expires=1777587360&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=farzC8%2FVMN4HYdEtXvdiC2OevH **** The URL of the OSS storage upgrade package file.
ModuleName String WifiConfigModify The module name of the OTA upgrade package.
ProductKey String A19mzPZ * * * * Of the product to which the OTA upgrade package belongs ProductKey .
ProductName String Ble1 The name of the product to which the OTA upgrade package belongs.
SignMethod String Md5 The signature method of the OTA upgrade package.
SrcVersion String 1.0.0 The version number of the OTA upgrade package to be upgraded. Description
Status Integer 2 OTA upgrade package status. ●**-1** : No validation is required. ●0 : Not Verified. ●1 : Verified. ●2 : Validation in progress. ●3 : Validation Failed.
Type Integer 0 OTA upgrade package type. ●0 : The whole package upgrade package. The upgrade package file you uploaded contains the complete upgrade package. The whole package upgrade package will be pushed to the device for upgrade.
Udi String {"Contains Critical Security Updates"} Custom information pushed to the device. The format of the text content is not restricted, and the length cannot exceed 4096 characters. After an upgrade task is created, IoT Platform sends the custom information to the device when it pushes an upgrade notification to the device.
UtcCreate String 2024-11-11 T11:11:11.000Z The time when the OTA upgrade package was created, in UTC format.
UtcModified String 2024-11-11 T11:11:11.000Z The time when the OTA upgrade package was last modified, in UTC format.
VerifyProgress Integer 50 The verification progress of the OTA upgrade package. ●0 : Not Verified. ●100 : Validation completed. ●Value N between 0 and 100: Indicates that N% of the devices have completed the upgrade. Upgrade package verification status according to the return parameters Status judgment.
RequestID String A01829CE-75A1-4920-B775-921146A1AB79 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.

Example

Request Example

curl 'https://si-d6e8d******848958054.tuyacloud.com:8686/?Action=ListOTAFirmware&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&FirmwareId=167&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

Normal Return Example

{
    "code": "",
    "firmwareInfo": {
        "destVersion": "1.1111",
        "firmwareDesc": "",
        "firmwareId": "134",
        "firmwareName": "myFirmwareName",
        "firmwareSign": "1111111111",
        "firmwareSize": 1152925,
        "firmwareUrl": "https://oss-612ba0f1-2e08-4adb-9606-78390169****.oss-cn-hangzhou.aliyuncs.com/ota/firmware/1591148694cffeb3ade09.tar_1724814144568.gz?Expires=1732099448&OSSAccessKeyId=LTAI5tHeD8bfRz5MbhUY****&Signature=AFe6U0xck5jylS0s95o143HdS1s%3D",
        "moduleName": "blei",
        "productKey": "k1h9drZ****",
        "productName": "bletest",
        "signMethod": "MD5",
        "status": 0,
        "type": 0,
        "udi": "",
        "utcCreate": "2024-09-18T09:32:00.937Z",
        "utcModified": "2024-09-18T09:32:00.937Z",
        "verifyProgress": 0
    },
    "requestId": "11413537-433a-4d72-97e3-72c2211a163e",
    "success": true
}