Queries the details of a specified OTA update package, including the name, type, and status of the update package.
Limits
Each Alibaba Cloud account can run a maximum of 20 queries per second (QPS).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | QueryOTAFirmware |
The operation that you want to perform. Set the value to QueryOTAFirmware. |
FirmwareId | String | Yes | s8SSHiKjpBfrM3BSN0z803**** |
The unique ID of the OTA update package. An update package ID is returned when you call the CreateOTAFirmware operation to create the update package. You can call the ListOTAFirmware operation and view the update package ID in the response. |
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. |
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. |
ErrorMessage | String | A system exception occurred. |
The error message returned if the call fails. |
FirmwareInfo | Struct |
The update package information returned if the call succeeds. For more information, see FirmwareInfo. |
|
DestVersion | String | 4.0.0 |
The version number of the OTA update package. |
FirmwareDesc | String | modified-WiFi-module |
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. Note This parameter is available if the OTA update package contains a single file.
|
FirmwareSize | Integer | 924 |
The size of the OTA update package file. Unit: bytes. Note This parameter is available if the OTA update package contains a single file.
|
FirmwareUrl | String | https://ota-***.aliyuncs.com/ota/572ef2fd12ca4791a5b21a9eb948****/5E962CF83DB1495E8337E9C8A4D1****.bin?Expires=1577587360&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=farzC8%2FVMN4HYdEtXvdiC2OevH**** |
The URL of the update package file that is stored in Object Storage Service (OSS). Note This parameter is available if the OTA update package contains a single file.
|
ModuleName | String | WifiConfigModify |
The name of the module. OTA updates are based on the firmware modules of a device. For more information, see Add a custom OTA module to an update package. |
MultiFiles | Array of OtaPackageFileDTO |
The information about the OTA update package files. This parameter is available if the OTA update package contains multiple files. |
|
FileMd5 | String | 3d04ab6462633508606e5f3d**** |
The MD5 value of the OTA update package file. |
Name | String | firmware1 |
The name of the OTA update package file. |
SignValue | String | 3d04ab6462633508606e5f3d**** |
The signature of the OTA update package file. |
Size | Integer | 200 |
The size of the OTA update package file. Unit: bytes. |
Url | String | https://ota-***.aliyuncs.com/ota/572ef2fd12ca4791a5b21a9eb948****/5E962CF83DB1495E8337E9C8A4D1****.bin?Expires=1577587360&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=farzC8%2FVMN4HYdEtXvdiC2OevH**** |
The URL of the update package file that is stored in Object Storage Service (OSS). |
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 | 1.0.0 |
The version number of the original update package to be updated. Note This parameter is returned if you perform a delta update. For more information about
update package types, see the description of the Type parameter.
|
Status | Integer | 2 |
The status of the OTA update package. Valid values:
|
Type | Integer | 0 |
The type of the OTA update package. Valid values:
|
Udi | String | {"ota_notice":"Upgrade the underlying camera driver to solve the problem of blurred video images. "} |
The custom information that was pushed to the device. The information can be up to 4,096 characters in length. No limit is applies to the content format. After you add the update package and create an update task, IoT Platform sends the custom information to the specified device when IoT Platform pushes the update notification. |
UtcCreate | String | 2019-12-28T02:42:22.000Z |
The time when the OTA update package was created. The time is displayed in UTC. |
UtcModified | String | 2019-12-28T02:42:41.000Z |
The time when the update task was last modified. The time is displayed in UTC. |
VerifyProgress | Integer | 0 |
The verification status of the OTA update package. Valid values:
|
RequestId | String | A01829CE-75A1-4920-B775-921146A1AB79 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful.
|
Examples
Sample requests
https://iot.cn-shanghai.aliyuncs.com/?Action=QueryOTAFirmware
&FirmwareId=s8SSHiKjpBfrM3BSN0z803****
&<Common request parameters>
Sample success responses
XML
format
<QueryOTAFirmwareResponse>
<RequestId>A01829CE-75A1-4920-B775-921146A1AB79</RequestId>
<FirmwareInfo>
<SrcVersion></SrcVersion>
<FirmwareSign>3d04ab6462633508606e5f3daac8****</FirmwareSign>
<ProductKey>a19mzPZ****</ProductKey>
<Type>0</Type>
<UtcModified>2019-12-28T02:42:41.000Z</UtcModified>
<SignMethod>MD5</SignMethod>
<UtcCreate>2019-12-28T02:42:22.000Z</UtcCreate>
<FirmwareSize>924</FirmwareSize>
<Status>2</Status>
<FirmwareId>UfuxnwygsuSkVE0VCN****0100</FirmwareId>
<FirmwareDesc>modified-WiFi-module</FirmwareDesc>
<FirmwareUrl>https://ota-***.aliyuncs.com/ota/572ef2fd12ca4791a5b21a9eb948****/5E962CF83DB1495E8337E9C8A4D1****.bin?Expires=1577587360&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=farzC8%2FVMN4HYdEtXvdiC2OevH****</FirmwareUrl>
<DestVersion>4.0.0</DestVersion>
<ProductName>MyProduct</ProductName>
<FirmwareName>t3q5rkNm</FirmwareName>
<ModuleName>WifiConfigModify</ModuleName>
<Udi>{"ota_notice":"Upgrade the underlying camera driver to solve the problem of blurred video images. "}</Udi>
<VerifyProgress>0</VerifyProgress>
</FirmwareInfo>
<Success>true</Success>
</QueryOTAFirmwareResponse>
JSON
format
{
"RequestId": "A01829CE-75A1-4920-B775-921146A1AB79",
"FirmwareInfo": {
"SrcVersion": "",
"FirmwareSign": "3d04ab6462633508606e5f3daac8****",
"ProductKey": "a19mzPZ****",
"Type": 0,
"UtcModified": "2019-12-28T02:42:41.000Z",
"SignMethod": "MD5",
"UtcCreate": "2019-12-28T02:42:22.000Z",
"FirmwareSize": 924,
"Status": 2,
"FirmwareId": "UfuxnwygsuSkVE0VCN****0100",
"FirmwareDesc": "modified-WiFi-module",
"FirmwareUrl": "https://ota-***.aliyuncs.com/ota/572ef2fd12ca4791a5b21a9eb948****/5E962CF83DB1495E8337E9C8A4D1****.bin?Expires=1577587360&OSSAccessKeyId=cS8uRRy54Rsz****&Signature=farzC8%2FVMN4HYdEtXvdiC2OevH****",
"DestVersion": "4.0.0",
"ProductName": "MyProduct",
"FirmwareName": "t3q5rkNm",
"ModuleName": "WifiConfigModify",
"Udi":"{\"ota_notice\":\" Upgrade the underlying camera driver to solve the problem of blurred video images. \"}",
"VerifyProgress": 0
},
"Success": true
}