Queries over-the-air (OTA) update packages.
Limits
Each Alibaba Cloud account can run a maximum of 10 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListOTAFirmware |
The operation that you want to perform. Set the value to ListOTAFirmware. |
CurrentPage | Integer | Yes | 1 |
The number of the page to return. Pages start from page 1. |
PageSize | Integer | Yes | 10 |
The number of entries to return on each page. Maximum value: 100. |
IotInstanceId | String | No | iot_instc_pu****_c*-v64******** |
The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console. Notice
For more information, see Overview. |
ProductKey | String | No | a19mzPZ**** |
The ProductKey of the product to which the OTA update package belongs. If you specify this parameter, IoT Platform returns the OTA update packages of the specified product. If you do not specify this parameter, IoT Platform returns the OTA update packages of the current Alibaba Cloud account. |
DestVersion | String | No | 4.0.0 |
The version number of the OTA update package. If you specify this parameter, only the OTA update package of the specified version number is returned. |
In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | iot.system.SystemException |
The error code returned if the call fails. For more information, see Error codes. |
CurrentPage | Integer | 1 |
The number of the returned page. |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
FirmwareInfo | Array of SimpleFirmwareInfo |
The OTA update packages returned if the call is successful. For more information, see SimpleFirmwareInfo. |
|
SimpleFirmwareInfo | |||
DestVersion | String | 4.0.0 |
The version number of the OTA update package. |
FirmwareDesc | String | firmwareDesc |
The description of the OTA update package. |
FirmwareId | String | UfuxnwygsuSkVE0VCN****0100 |
The unique ID of the OTA update package. |
FirmwareName | String | t3q5rkNm |
The name of the OTA update package. |
FirmwareSign | String | 3d04ab6462633508606e5f3daac8**** |
The signature of the OTA update package. |
FirmwareSize | Integer | 924 |
The size of the update package. Unit: bytes. |
ModuleName | String | module1234 |
The name of the module. |
ProductKey | String | a19mzPZ**** |
The ProductKey of the product to which the OTA update package belongs. |
ProductName | String | MyProduct |
The name of the product to which the OTA update package belongs. |
SignMethod | String | MD5 |
The signature method of the OTA update package. |
SrcVersion | String | V1.0.0 |
The version number of the original update package to be updated. Note The return value is null if you perform a full update.
|
Status | Integer | 0 |
The status of the OTA update package. Valid values:
|
Type | Integer | 0 |
The type of the OTA update package. Valid values:
|
UtcCreate | String | 2019-12-28T02:42:22.000Z |
The time when the update package was created. The time is displayed in UTC. |
UtcModified | String | 2019-12-28T02:42:22.000Z |
The time when the update task was last modified. The time is displayed in UTC. |
PageCount | Integer | 1 |
The total number of pages. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | A01829CE-75A1-4920-B775-921146A1AB79 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Total | Integer | 1 |
The total number of OTA update packages. |
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=ListOTAFirmware
&CurrentPage=1
&PageSize=10
&ProductKey=a19mzPZ****
&DestVersion=4.0.0
&<Common request parameters>
Sample success responses
XML
format
<ListOTAFirmwareResponse>
<PageCount>1</PageCount>
<PageSize>10</PageSize>
<RequestId>A01829CE-75A1-4920-B775-921146A1AB79</RequestId>
<FirmwareInfo>
<SimpleFirmwareInfo>
<SrcVersion>1.0.0</SrcVersion>
<FirmwareSign>3d04ab6462633508606e5f3daac8****</FirmwareSign>
<ProductKey>a19mzPZ****</ProductKey>
<Type>0</Type>
<UtcModified>2019-12-28T02:42:22.000Z</UtcModified>
<SignMethod>MD5</SignMethod>
<UtcCreate>2019-12-28T02:42:22.000Z</UtcCreate>
<FirmwareSize>924</FirmwareSize>
<Status>0</Status>
<FirmwareId>UfuxnwygsuSkVE0VCN****0100</FirmwareId>
<FirmwareDesc>firmwareDesc</FirmwareDesc>
<DestVersion>4.0.0</DestVersion>
<ProductName>MyProduct</ProductName>
<FirmwareName>t3q5rkNm</FirmwareName>
<ModuleName>module1234</ModuleName>
</SimpleFirmwareInfo>
</FirmwareInfo>
<CurrentPage>1</CurrentPage>
<Success>true</Success>
<Total>1</Total>
</ListOTAFirmwareResponse>
JSON
format
{
"PageCount": 1,
"PageSize": 10,
"RequestId": "A01829CE-75A1-4920-B775-921146A1AB79",
"FirmwareInfo": {
"SimpleFirmwareInfo": [{
"SrcVersion": "1.0.0",
"FirmwareSign": "3d04ab6462633508606e5f3daac8****",
"ProductKey": "a19mzPZ****",
"Type": 0,
"UtcModified": "2019-12-28T02:42:22.000Z",
"SignMethod": "MD5",
"UtcCreate": "2019-12-28T02:42:22.000Z",
"FirmwareSize": 924,
"Status": 0,
"FirmwareId": "UfuxnwygsuSkVE0VCN****0100",
"FirmwareDesc": "firmwareDesc",
"DestVersion": "4.0.0",
"ProductName": "MyProduct",
"FirmwareName": "t3q5rkNm",
"ModuleName": "module1234"
}]
},
"CurrentPage": 1,
"Success": true,
"Total": 1
}
Error codes
For a list of error codes, visit the API Error Center.