ListOTAFirmware

更新时间:2025-10-10 06:55:13下载pdf

查询OTA升级包列表。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListOTAFirmware 系统规定参数。取值:ListOTAFirmware。
CurrentPage Integer 1 指定从返回结果中的第几页开始显示。页数从1开始排序。
PageSize Integer 10 指定返回结果中每页显示的固件数量。最大限制为100。
ProductKey String a19mzPZ**** OTA升级包所属产品的ProductKey
DestVersion String 4.0.0 OTA升级包版本号。传入该参数,则查询版本号为指定版本号的OTA升级包。

注意:调用API时,除了本文介绍的该API的特有请求参数,还需传入公共请求参数。公共请求参数说明,请参见公共参数

返回数据

名称 类型 示例值 描述
Code String iot.system.SystemException 调用失败时,返回的错误码。更多信息,请参见错误码
CurrentPage Integer 1 当前页码。
ErrorMessage String 系统异常 调用失败时,返回的出错信息。
FirmwareInfo Array of SimpleFirmwareInfo 调用成功时,返回的OTA升级包列表。
SimpleFirmwareInfo
DestVersion String 1.0.1 当前OTA升级包版本号。
FirmwareDesc String firmware desc OTA升级包描述信息。
FirmwareId String 145 OTA升级包ID,OTA升级包的唯一标识符。
FirmwareName String firmware1 OTA升级包名称。
FirmwareSign String 3d04ab6462633508606e5f3daac8**** OTA升级包内容的签名值。
FirmwareSize Integer 924 OTA升级包大小,单位:字节。
ModuleName String ble OTA升级包的模块名称。
ProductKey String k1nhvyl**** OTA升级包所属产品的ProductKey。
ProductName String ble1 OTA升级包所属产品的名称。
SignMethod String MD5 OTA升级包签名方式。
SrcVersion String 1.0.0 待升OTA升级包版本号。
Status Integer 0 OTA升级包状态。

- 0:未验证。

- 1:已验证。

- 2:验证中。

- 3:验证失败。
Type Integer 0 OTA升级包类型。

- 0:整包固件。
UtcCreate String 2024-11-11T11:11:11.000Z OTA升级包创建时的时间,UTC格式。
UtcModified String 2024-11-11T11:11:11.000Z OTA升级包最后一次修改时的时间,UTC格式。
PageCount Integer 1 总页数。
PageSize Integer 10 每页显示的升级包数量。
RequestId String 291438BA-6E10-4C4C-B761-243B9A0D324F 物联网平台为该请求生成的唯一标识符。
Success Boolean true 是否调用成功。

- true:调用成功。

- false:调用失败。
Total Integer 1 OTA升级包数量总计。

示例

请求示例

curl 'https://si-d6e******848958054.tuyacloud.com:8686/?Action=ListOTAFirmware&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&CurrentPage=1&PageSize=10&ProductKey=k1nhvyl****&DestVersion=1.0.0&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'

正常返回示例

{
    "code": "",
    "currentPage": 1,
    "firmwareInfo": {
        "simpleFirmwareInfo": [
                {
            "srcVersion": "1.0.0",
            "firmwareSign": "3d04ab6462633508606e5f3daac8****",
            "productKey": "k1nhvyl****",
            "type": 0,
            "utcModified": "2024-11-11T11:11:11.000Z",
            "signMethod": "MD5",
            "utcCreate": "2024-11-11T11:11:11.000Z",
            "firmwareSize": 924,
            "status": 0,
            "firmwareId": "167",
            "firmwareDesc": "this is firmware",
            "destVersion": "1.0.1",
            "productName": "ble1",
            "firmwareName": "bleFirmware1",
            "moduleName": "ble"
          }
        ]
    },
    "pageCount": 1,
    "pageSize": 10,
    "requestId": "07e1524e-edba-4316-8c83-8714dfaf5b90",
    "success": true,
    "total": 1
}