Query Device Capability

Last Updated on : 2022-11-11 03:43:41

Query a specified device capability based on the device ID and capability code.

API address

GET: /v1.0/iot-03/devices/{device_id}/capabilities/{capability_code}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
capability_codeStringuritrueThe code of a specified capability.
channelsStringqueryfalseThe list of channels. If the capability definition contains the channels parameter, you can enter the channels parameter here.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
valueObjectThe value of a specified capability.
channelStringThe number of a specified channel.

Request example

GET: /v1.0/iot-03/devices/64***dz/capabilities/switch

Return example

{
    "result": [
        {
            "channel": "105",
            "value": false
        }
    ],
    "t": 1644543866147,
    "success": true
}

Error code

For more information, see error code.