device.capability.list (List capabilities)
device.capability.list: List capabilities
What it does
Lists available capabilities, including value constraints. Query by device requires the device to be bound (unbound returns DV2013); query by product model only validates the token. This API does not trim the list by permission.
Request URL
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.capability.list
Minimum permission
Query by device requires the device bound to the current account, or visible via share/sub-account grant; the returned list is not filtered by capability share codes. Query by product model only validates the token. Sub-account calls require a token with link reachability (see the device.capability.list description).
Request parameters
| Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
token | String | yes | Administrator, sub-user, or sub-account accessToken | ||
deviceId | String | conditional | Pass when querying by device. At least one of deviceId and productId | ||
productId | String | conditional | Pass when querying by model. At least one of deviceId and productId | ||
channelId | String | no | Channel index; IPCs often "0". Do not pass -1 | Only for query by device. Omit = device level. Pass = that channel’s channel-level items plus device level | |
lang | String | no | App site default | e.g. zh-CN | Language for display strings |
incloudTsl | Boolean | no | false | true / false | When true, returns tsl (ident/ref) on each leaf |
If both deviceId and productId are sent, the device wins; mismatched model returns DV2009. Fields match device.capability.list.
Common request fields and signing: Signing and Common request payload.
Request example
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"system": {
"ver": "1.0",
"appId": "lcdxxxxxxxxx",
"sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
"time": 1706511734,
"nonce": "f5a1ae2d-c09c-4d39-a744-83a5c2c653c2"
},
"params": {
"token": "<yourAccessToken>",
"deviceId": "TESTIPC000012345",
"channelId": "0"
}
}
Response data fields
| Name | Type | Description |
|---|---|---|
deviceId | String | Echo. Omitted when querying by model |
channelId | String | Echo; omitted if not sent |
productId | String | Product model. Echo from platform when querying by device |
bindType | String | Model bind type |
capabilities | Array | Available capabilities |
capabilities[].capabilityId | String | Capability group id. Response-only—do not use for get/set/invoke or alarm lookup; use full propertyId / serviceId / eventId below |
capabilities[].name | String | Display name |
capabilities[].scope | String | device device / channel channel / all both |
capabilities[].properties | Array | Configuration/state items; [] if none |
capabilities[].properties[].propertyId | String | Full propertyId |
capabilities[].properties[].name | String | Display name |
capabilities[].properties[].desc | String | Description. Omitted if empty |
capabilities[].properties[].accessMode | String | r read / w write / rw read-write. set allowed only if w is present |
capabilities[].properties[].defaultData | same as point | Default. Omitted if none. Switches are int 0/1 |
capabilities[].properties[].dataType | Object | Value constraints |
capabilities[].properties[].dataType.type | String | int / float / enum / text / struct / array. Public API does not expose bool |
capabilities[].properties[].dataType.specs.range | Array | [min, max], numeric types only |
capabilities[].properties[].dataType.specs.list | Array | Enum entries with value and desc |
capabilities[].services | Array | One-shot actions; [] if none |
capabilities[].services[].serviceId | String | Full serviceId |
capabilities[].services[].name | String | Display name |
capabilities[].services[].inputData | Array | Inputs; field is the invoke key. [] if none |
capabilities[].services[].outputData | Array | Outputs. [] if none |
capabilities[].services[].timeoutMs | Int | Suggested timeout |
capabilities[].events | Array | Reported events; [] if none |
capabilities[].events[].eventId | String | Full eventId; msgType in push payloads is this value. See Overview and common payload |
capabilities[].events[].name | String | Display name |
capabilities[].events[].outputData | Array | Event fields. [] if none |
Struct child keys use field. Actual enum steps for a model may be a subset of the catalog.
Response example
{
"id": "d5c287b4-5b2f-4f03-baf5-8032c5c354af",
"result": {
"code": "0",
"msg": "Operation is successful",
"data": {
"deviceId": "TESTIPC000012345",
"channelId": "0",
"productId": "56WGTET2",
"bindType": "paas",
"capabilities": [
{
"capabilityId": "detection.motion",
"name": "Motion detection",
"scope": "channel",
"properties": [
{
"propertyId": "detection.motion.enabled",
"name": "Motion detection",
"accessMode": "rw",
"defaultData": 0,
"dataType": {
"type": "int",
"specs": {
"range": [0, 1]
}
}
},
{
"propertyId": "detection.motion.sensitivity",
"name": "Sensitivity",
"accessMode": "rw",
"dataType": {
"type": "enum",
"specs": {
"list": [
{ "value": "1", "desc": "Low" },
{ "value": "3", "desc": "Medium" },
{ "value": "5", "desc": "High" }
]
}
}
}
],
"services": [],
"events": [
{
"eventId": "detection.motion.detected",
"name": "Motion alarm",
"outputData": []
}
]
},
{
"capabilityId": "ptz.aim",
"name": "PTZ aim",
"scope": "channel",
"properties": [],
"services": [
{
"serviceId": "ptz.aim.relative",
"name": "Move by speed",
"inputData": [
{
"field": "horizontal",
"name": "Horizontal speed",
"dataType": { "type": "text" }
},
{
"field": "vertical",
"name": "Vertical speed",
"dataType": { "type": "text" }
},
{
"field": "zoom",
"name": "Zoom",
"dataType": { "type": "text" }
},
{
"field": "duration",
"name": "Duration",
"dataType": { "type": "int" }
}
],
"outputData": [],
"timeoutMs": 10000
}
],
"events": []
}
]
}
}
}
Error codes
This API may return the codes below.
Gateway
DV20xx
