Query Firmware Version by Firmware Key

Last Updated on : 2023-06-20 12:39:04

Query the version information about the specified firmware based on the product ID and firmware key on the Tuya IoT Development Platform. For example, the production firmware, update file, enabling status, type, and unique ID of the firmware version.

API address

GET: /v1.0/iot-03/product/firmware/versions

Request parameter

Parameter nameTypeINRequiredDescription
product_idStringquerytrueThe product ID.
firmware_keyStringquerytrueThe firmware key.

Return parameter

Parameter nameTypeDescription
resultListThe list of results.

Description of result

Parameter nameTypeDescription
remarkStringThe remarks.
filesListThe information about a specified firmware version file.
gmt_modifiedLongThe time when it is modified.
firmware_versionStringThe firmware version number.
shelf_statusIntegerThe enabling status. Valid values:
  • 0: The firmware is not enabled.
  • 1: The firmware is enabled.
  • 2: The firmware is to be disabled soon.
version_typeIntegerThe firmware version type. Valid values:
  • 1: general version.
  • 2: key version.
firmware_version_idLongThe firmware version ID.

Description of files

Parameter nameTypeDescription
nameStringThe name of a specified firmware version file.
full_urlStringThe URL of a specified firmware version file.
typeStringThe file type. Valid values:
  • firmware_production_QIO: QIO production firmware.
  • firmware_production_DOUT: DOUT production firmware.
  • firmware_production: production firmware.
  • firmware_upgrade: update firmware.
  • firmware_production_SUB: subsidiary production firmware.
  • firmware_upgradeDiff: differential firmware.

Request example

GET: /v1.0/iot-03/product/firmware/versions
{
  "product_id": "***pid",
  "firmware_key": "key****"
}

Error code

For more information, see error code.