Query Device Capability List

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

Query a list of capabilities supported by a specified device based on the device ID and criteria.

API address

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

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
queryCapabilityDefinitionQueryReqqueryfalseThe query criteria.

Description of query

Parameter nameTypeINRequiredDescription
tagsString falseThe capability tag. Valid values: standard (default value) and original.

Return parameter

Parameter nameTypeDescription
resultCapabilitiesDefinitionRespThe information about definitions of device capabilities.

Description of result

Parameter nameTypeDescription
capabilitiesListThe list of capability definitions.
device_idStringThe device ID.

Description of capabilities

Parameter nameTypeDescription
capability_codeStringThe code to identify a capability.
nameStringThe name of a specified capability.
methodsListThe list of operation methods.
tagsListThe list of tags.
requestParameterSchemaThe description of the schema in a specified request.
responseParameterSchemaThe description of the schema in a specified response.

Description of request

Parameter nameTypeDescription
typeStringThe type of a specified field. Enumeration values: string, integer, boolean, array, json, and raw.
nameStringThe name of a specified field.
descriptionStringThe description of a specified field.

Description of response

Parameter nameTypeDescription
typeStringThe type of a specified field. Enumeration values: string, integer, boolean, array, json, and raw.
nameStringThe name of a specified field.
descriptionStringThe description of a specified field.

Request example

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

Return example

{
    "result": {
        "capabilities": [
            {
                "request": {
                    "description": "",
                    "type": "boolean",
                    "name": "Switch"
                },
                "methods": [
                    "get",
                    "post",
                    "event"
                ],
                "tags": [
                    "standard"
                ],
                "capability_code": "switch_led",
                "response": {
                    "description": "",
                    "type": "boolean",
                    "name": "Switch"
                },
                "name": "Light Switch"
            }
        ],
        "device_id": "64****dz"
    },
    "t": 1644546985633,
    "success": true
}

Error code

For more information, see error code.