Querying the Version Package List
Typical Scenario
Before upgrading the device version, an application can call this API to query the version upgrade packages that have been uploaded to the platform to ensure that the target version package has been uploaded.
API Function
This API is used by an application to query a list of uploaded version packages that meet a specified condition.
API Description
1 | QueryUpgradePackageListOutDTO queryUpgradePackageList(QueryUpgradePackageListInDTO quplInDTO, String accessToken) throws NorthApiException
|
Parameter Description
| Parameter | Mandatory or Optional | Type | Location | Description |
|---|---|---|---|---|
| quplInDTO | Mandatory | QueryUpgradePackageListInDTO structure | query | For details, see QueryUpgradePackageListInDTO structure. |
| accessToken | Mandatory | String | header | If the Periodically Refreshing a Token API is called, set this parameter to null. Otherwise, set this parameter to the accessToken obtained by the Authentication API. |
QueryUpgradePackageListInDTO structure
| Parameter | Mandatory or Optional | Type | Location | Description |
|---|---|---|---|---|
| fileType | Optional | String(256) | query | Indicates the type of a version package.
|
| deviceType | Optional | String(256) | query | Indicates the type of the device to which the version package is applicable. |
| model | Optional | String(256) | query | Indicates the model of the device to which the version package is applicable. |
| manufacturerName | Optional | String(256) | query | Indicates the manufacturer of the device to which the version package is applicable. |
| version | Optional | String(256) | query | Indicates the version of the version package. |
| pageNo | Optional | Integer | query | Indicates the page number. Default value: 0
|
| pageSize | Optional | Integer | query | Indicates the number of records on each page. The value ranges from 1 to 100. The default value is 10. |
Response Parameters
QueryUpgradePackageListOutDTO structure
| Parameter | Type | Description |
|---|---|---|
| data | List< QueryUpgradePackageOutDTO> | Indicates the version package list. For details, see QueryUpgradePackageOutDTO structure. |
| pageNo | Integer | Indicates the page number. |
| pageSize | Integer | Indicates the number of records to be displayed on each page. |
| totalCount | Integer | Indicates the total number of query results. |
QueryUpgradePackageOutDTO structure
| Parameter | Type | Description |
|---|---|---|
| fileId | String | Identifies a version package. |
| name | String | Indicates the version package name. |
| version | String | Indicates the version of the version package. |
| fileType | String | Indicates the type of a version package.
|
| deviceType | String | Indicates the type of the device to which the version package is applicable. |
| model | String | Indicates the model of the device to which the version package is applicable. |
| manufacturerName | String | Indicates the manufacturer of the device to which the version package is applicable. |
| protocolType | String | Indicates the protocol used by the device to which the version package is applicable. |
| description | String | Indicates the version package description. |
| date | String | Indicates the date on which the version package was generated. |
| uploadTime | String | Indicates the date on which the version package was uploaded. |
Error Codes
| HTTP Status Code | Error Code | Error Description | Remarks |
|---|---|---|---|
| 400 | 120015 | Bad request error. | A request error occurs. Recommended handling: Check whether the values of pageNo and pageSize in the API request are within the valid ranges. |
| 400 | 123029 | The value of pageNo or pageSize exceeds the upper limit. | The value of pageNo or pageSize exceeds the upper limit. Recommended handling: Change the value of pageNo or pageSize to a valid value. |
| 403 | 1010009 | The application calls the API at a frequency that exceeds the flow control threshold. | The application calls the API at a frequency that exceeds the flow control threshold (100 calls per minute by default). Recommended handling: Contact IoT platform maintenance personnel to adjust the flow control threshold or control the API call frequency. |
| 403 | 1010005 | Invalid access token or application ID. | The access token is invalid. Recommended handling: Check whether accessToken carried in the API request is correct. |
Last Article: Device Upgrade
Next Article: Querying a Version Package
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.