Query the list of OTA module versions reported by the device.
| Name | Type | Required | Sample Values | Description |
|---|---|---|---|---|
| Action | String | Yes | ListOTAModuleVersionsByDevice | System defined parameters. Value: ListOTAModuleVersionsByDevice. |
| CurrentPage | Integer | Yes | 1 | Specifies the page number in the returned results. The default value is 1. |
| PageSize | Integer | Yes | 10 | Specifies the number of module versions displayed per page in the returned results. Quantity Limit: A maximum of 200 items can be displayed per page. |
| ProductKey | String | No | K1nhvyl * * * * | To query the product to which the device belongs ProductKey . |
| DeviceName | String | No | Device1 | Specifies the name of the device to query. |
| IoTID | String | No | And * * * * | The ID issued by IoT platform for the device. The unique identifier of the device. |
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.
| Name | Type | Sample Values | Description |
|---|---|---|---|
| Code | String | Iot.system.SystemException | The error code returned when the call fails. For more information, see Error codes. |
| CurrentPage | Integer | 1 | The current page number. |
| Data | Array of SimpleOTAModuleInfo | The module version information returned by the device when the call is successful. For more information, see the following SimpleOTAModuleInfo information. | |
| SimpleOTAModuleInfo | |||
| DeviceName | String | Device1 | The device name. |
| IoTID | String | Next * * * * | The device ID. |
| ModuleName | String | Ble | The module name. |
| ModuleVersion | String | 1.0.0 | The module version reported by the device. |
| ProductKey | String | K1nhvyl * * * * | Of the product to which the device belongs ProductKey . |
| ErrorMessage | String | System Exception | Error information returned when the call fails. |
| PageCount | Integer | 1 | The total number of pages returned. |
| PageSize | Integer | 10 | Number of module versions displayed per page. |
| RequestID | String | Kan | The unique identifier that IoT Platform generates for the request. |
| Success | Boolean | True | Indicates whether the call succeeded. ●True : The call succeeded. ●False : The call failed. |
| Total | Integer | 10 | The total number of module versions reported by the device. |
Request Example
curl 'https://si-d6e8******8958054.tuyacloud.com:8686/?Action=ListOTAModuleVersionsByDevice&SignatureNonce=9e6189124f5a4716ad2de849467b****&AccessKeyId=xMr9wgwXQLhv5AUa65o0****&SignatureMethod=HMAC-SHA1&Timestamp=2024-11-19T09%3A47%3A43Z&CurrentPage=1&PageSize=10&Signature=WJN0Ee8%2BX6pogcD3loLHIqQNEN0%3D'
Normal Return Example
{
"code": "",
"currentPage": 1,
"data": {
"simpleOTAModuleInfo": [
{
"deviceName": "device001",
"iotId": "OZs5tjTkzRRTZSCekmbRk1****",
"moduleName": "ble",
"moduleVersion": "1.0",
"productKey": "k1h9drZble"
}
]
},
"pageCount": 1,
"pageSize": 10,
"requestId": "47f85a55-2ffb-40d4-9d0a-efd41fac7380",
"success": true,
"total": 1
}