Device capabilities
Device capabilities
Once a device is bound, toggling settings, moving the PTZ, and receiving alarms all go through POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/{methodName}. The outer request body is id, system, and params. The id in examples on each page is the same sample request ID for side-by-side comparison; it is not a business field. For sign, see Development guide.
To see what a device supports, read or write configuration, or run an action, use the first four pages under Using capabilities:
| Goal | Method name | Page |
|---|---|---|
| List capabilities for this device or product model | device.capability.list | List capabilities |
| Read multiple properties in one call | device.property.get | Read properties |
| Write multiple properties in one call | device.property.set | Write properties |
| PTZ move, snapshot, and similar one-shot actions | device.service.invoke | Invoke a service |
Detection, PTZ, lighting, and other domains are in the sidebar. Capability events: Device messages, Receive device messages, and Receive alarm messages; legacy msgType values are in Event message types. Restart, Wi-Fi, time sync, upgrade, and related tasks are in Device maintenance. Device binding is in Device management.
Use an administrator, sub-user, or sub-account accessToken. Sub-account tokens: Get sub-account token; grants: Add sub-account permissions. Call limits: Limits and rates. Callback URLs: Push configuration. Sub-account and shared-device permissions apply per capability. On failure, check result.code in Global return codes.
Invocation modes (discovery / v2 / legacy OpenAPI)
- Discovery: On a bound device, call
device.capability.listwithdeviceId. To preview by model (e.g. before bind), useproductIdfrom device details (deviceIdorproductIdrequired). OnlypropertyId/serviceIdreturned in the list should be used with v2 get/set/invoke. - Discovery-only leaves: pages marked discovery-only have no property/service examples—do not call get/set/invoke on them.
- Public v2: “Run once” below and most capability subpages. For get/set/invoke, same as list: pass
deviceIdwhen bound;productIdis optional (mismatch →DV2009). - Legacy OpenAPI: see Device capability integration and Legacy APIs.
Run once
Turn on motion detection on a bound device. You need an administrator, sub-user, or sub-account accessToken and the device serial number.
Channel-level calls must include channelId (often "0" on IPCs); omitting it returns DV2007. An administrator needs no extra permission on a device they bound. A shared device needs basic configuration permission. A bound sub-user does not. A sub-account needs Config. Other capabilities follow their own pages.
1. Check whether this device supports motion detection
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.capability.list
{
"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"
}
}
In result.data.capabilities, find the block with capabilityId detection.motion, confirm detection.motion.enabled is listed, and check that accessMode includes w.
2. Read the current switch
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.get
Full request: Get motion detection enabled.
{
"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",
"properties": ["detection.motion.enabled"]
}
}
On success, result.code is "0" and data.properties["detection.motion.enabled"] is 0 or 1.
3. Turn the switch on
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.property.set
Full request: Set motion detection enabled.
{
"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",
"properties": {
"detection.motion.enabled": 1
}
}
}
On success, result.code is "0" and data is {}. Read again to confirm the value is 1.
To receive motion alarms, subscribe to capabilityEvent in callbackFlag; see Receive device messages. Sensitivity, region, and schedule are on the motion detection pages (sidebar Detection and alarms → Motion). PTZ is under PTZ in the sidebar. On failure, check result.code: DV2007—add channelId; DV2004—check the value. If detection.motion.enabled is absent, list does not return that item. See Global return codes.
