Device capability integration
Device capability integration
Start with Capability usage and the Device capability model: call device.capability.list to see what the device supports, then use device.property.get, device.property.set, and device.service.invoke to read, write, or trigger capabilities. Device list and online state stay on Device APIs. Calls that must remain POST /openapi/{method} are under Legacy APIs.
Device APIs vs capabilities vs legacy HTTP
| Need | Start here |
|---|---|
| Paged or batch device detail | Paged device detail, Batch detail |
| Online / bind state | Online status, Bind state |
| Rename, password, upgrade, detection, record plans | Capability usage and leaf pages |
| PTZ, local record plan, etc. still on old HTTP | Matching page under Legacy APIs |
Do not invent a targetId. Use propertyId / serviceId / eventId from device.capability.list only.
device.capability.list: List capabilities
POST https://openapi-[DataCenter].easy4ip.com/openapi/v2/device.capability.list with deviceId (or productId before bind). Only listed propertyId / serviceId values may be used with get/set/invoke. See List capabilities.
device.property.get: Read properties
Read one or more property values. Pass deviceId for a bound device; productId is optional (if sent and it does not match the device model → DV2009). See Read properties and the leaf page for each capability.
device.property.set: Write properties
Write properties (switches, plans, sensitivity, etc.). Pass deviceId for a bound device; productId is optional (same check as list/get). See Write properties and each leaf Default / Valid values.
device.service.invoke: Invoke a service
One-shot actions (snapshot, format, PTZ step, etc.). Pass deviceId for a bound device; productId is optional (same check as list/get). See Invoke a service.
Fields and value ranges
Copy Default and Valid values from the v2 leaf page. Do not assume old HTTP field names still apply. Channel-scoped capabilities need channelId (IPC often "0"); omitting it returns DV2007.
Test on one device
Run device.capability.list on one bound serial number. Confirm the leaf exists and accessMode allows your verb, then call get/set/invoke once. Unbound list-by-device returns DV2013.
Errors by layer
| Layer | Where to look |
|---|---|
| Request body / token / sign | Return codes, Development specification (TK1002, SN1005) |
Capability DV20xx | Capability errors and the leaf page |
