Get Device Specification

Last Updated on : 2023-06-15 04:48:16

Get the specifications and properties of a specified device by device ID, including the instruction set and status set.

API address

GET: /v1.2/iot-03/devices/{device_id}/specification

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.

Return parameter

Parameter nameTypeDescription
resultFunctionStatusToLangResThe returned result.

Description of result

Parameter nameTypeDescription
categoryStringThe category of a specified product.
statusListThe standard status set.
functionsListThe standard instruction set.

Description of functions

Parameter nameTypeDescription
codeStringThe code of a specified device instruction.
typeStringThe type of a specified device instruction.
nameStringThe name of a specified device instruction.
valuesStringThe value description of a specified device instruction.
lang_configMap<String,String>The multilingual description.

Description of status

Parameter nameTypeDescription
codeStringThe code of specified device status.
typeStringThe type of specified device status.
nameStringThe name of specified device status.
valuesStringThe value description of specified device status.
lang_configMap<String,String>The multilingual description.

Request example

GET: /v1.2/iot-03/devices/****id/specification

Return example

{
    "result": {
        "functions": [
            {
                "code": "switch",
                "values": "{}",
                "lang_config": {
                    "false": "Off",
                    "true": "On"
                },
                "type": "Boolean",
                "name": "Switch"
            },
            {
                "code": "temp_set",
                "values": "{\"unit\":\"℃\",\"min\":0,\"max\":37,\"scale\":0,\"step\":1}",
                "lang_config": {
                    "unit": "°C"
                },
                "type": "Integer",
                "name": "Target Temperature"
            }
        ],
        "category": "qn",
        "status": [
            {
                "code": "switch",
                "values": "{}",
                "lang_config": {
                    "false": "Off",
                    "true": "On"
                },
                "type": "Boolean",
                "name": "Switch"
            },
            {
                "code": "temp_set",
                "values": "{\"unit\":\"℃\",\"min\":0,\"max\":37,\"scale\":0,\"step\":1}",
                "lang_config": {
                    "unit": "°C"
                },
                "type": "Integer",
                "name": "Target Temperature"
            },
            {
                "code": "temp_current",
                "values": "{\"unit\":\"℃\",\"min\":-20,\"max\":50,\"scale\":0,\"step\":1}",
                "lang_config": {
                    "unit": "°C"
                },
                "type": "Integer",
                "name": "Current Temperature"
            }
        ]
    },
    "t": 1639022337569,
    "success": true
}

Error code

For more information, see error code.