Skip to main content

List devices in an organization

GET 

/api/v1/orgs/{orgId}/devices

This api will response paginated list of devices belonging to a specific organization ID.

Weda Nodes, the Sub Nodes bound to them, and Custom Devices are returned in the same list, told apart by the 'type' field ('WedaNode', 'SubNode', or 'CustomDevice'). They carry the same fields; a Sub Node has no hardware model of its own, inherits the organization and the status of its Weda Node, and a Custom Device likewise has no hardware model.

Each Weda Node or Sub Node carries its connectivity, derived at query time from the device's heartbeat. Only an Activated device is monitored: a Registered or Deactivated device reads Disconnected with a null updatedAt, and an Activated device counts only a heartbeat received after it was activated, otherwise it also reads Disconnected with a null updatedAt. A Sub Node is judged on its own heartbeat, but is monitored according to the status and activation time of the Weda Node it is bound to. Connectivity does not apply to a Custom Device, which is not monitored through heartbeats, and is always null for it.

An optional 'deviceIds' filter restricts the result to the given devices. Repeat the key once per id. Ids outside the organization are omitted from the result rather than reported. 'sorting' takes the response's own field names - deviceId, deviceName, hwModel, orgId, status, createdAt, type - each with an optional asc/desc, comma-separated. Anything else is rejected with 400; connectivity is resolved after paging and cannot be sorted on. Paging and the total apply to the filtered set across all kinds, and the page size is capped at 100.

Request​

Responses​

OK