跳至主要内容

Get sensor and command definitions

GET 

/api/v1/devices/{deviceId}/capabilities/schema

Get the DTDL Interfaces for one category of configuration types. Applies to WEDA Node and SubNode whose agent provides a capability model (agent SDK version 1.2 or later); otherwise 422. A Custom Device returns 404.

'type=configs' returns the sensor-config Interfaces (used together with GET capabilities/sensors); 'type=commands' returns the command Interfaces. The DTDL is returned verbatim, including the base Interfaces reached through 'extends'. Resolve a sensor's definition by matching its dtmi (from GET capabilities/sensors) against an entry's '@id'.

The DTDL defines a sensor's runtime configuration as 'Report' only, so that is the sole name this schema uses. The 'config' key also accepted by PATCH telemetry-configs carries the same object and has no separate definition here.

Independent of the device's current desired/reported configuration and of which sensors the device actually has.

Request​

Responses​

DTDL Interfaces for the requested category