Get Update Information

Last Updated on : 2024-06-29 01:25:05download

Get the update information of the specified device based on the device ID.

API address

GET: /v2.0/cloud/thing/{device_id}/firmware

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultFusionResultThe returned result.

Description of result

Parameter nameTypeDescription
successBooleanIndicates whether the operation is successful.
error_codeStringThe error code.
error_msgStringThe error message.
resultListThe returned result.

Description of result

Parameter nameTypeDescription
upgrade_statusIntegerThe update status. Valid values:
  • 0: No update is going on.
  • 1: The device is ready.
  • 2: The update is in progress.
  • 3: The update is completed.
  • 4: An exception occurs during an update process.
  • 7: The update timed out.
current_versionStringThe current version number of the firmware in the specified channel.
versionStringThe target version number of the firmware in the specified channel after the OTA update.
descStringThe description of the update.
upgrading_descStringThe multilingual text when the firmware update is in progress.
downloading_descStringThe multilingual text when the firmware download is in progress. Currently, this field only applies to NB-smart devices.
waiting_descStringThe text on the app when waiting for the device to wake up during firmware update of non-keep-alive devices.
dev_typeIntegerThe type of device. Valid values:
  • 0: generic type of device.
  • 1: non-keep-alive device.
timeoutIntegerThe update timeout period.
upgrade_typeIntegerThe update method.
typeIntegerThe firmware update channel.
type_descStringThe description of the module type.
urlStringThe URL field of the specified file. It applies to Bluetooth devices and more.
md5StringThe MD5 hash of the update file.
signStringThe signature of the update file.
file_sizeStringThe file size.
last_upgrade_timeLongThe last update time.
firmware_deploy_timeLongThe time when the firmware was released.
control_typeIntegerIndicates whether the device is controllable during the update process. Valid values:
  • 0: not controllable.
  • 1: controllable.
can_upgradeBooleanIndicates whether the device can be updated if the data point conditions are met. Valid values:
  • 0: The device cannot be updated.
  • 1: The device can be updated.
remindStringThe multilingual reason why the device cannot be updated.

Request example

GET: /v2.0/cloud/thing/vdev1243432***/firmware

Return example

    "result": {
        "channel": 0,
        "current_version": "1.0.0",
        "version": "2.0.0",
        "upgrade_type": 1,
        "timeout": 60,
        "upgrade_status": 1,
        "type_desc": "Bluetooth",
        "desc": "Firmware update",
        "control_type": 0
    "success": true

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.