query · Module: IoT · Requires iot:read
Arguments
| Argument | Type | Description |
|---|---|---|
type | String | Filter by type. |
status | String | Filter by status. |
facility | String | Filter by facility. |
vehicle | String | Filter by vehicle. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
Returns
DeviceList!
| Field | Type |
|---|---|
data | [Device!]! |
has_more | Boolean |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Devices($limit: Int) {
devices(limit: $limit) {
data {
id
object
type
status
name
livemode
created
updated
manufacturer
model
serial_number
attached_to {
facility
vehicle
handling_unit
}
capabilities
authentication {
method
certificate_fingerprint
expires_at
}
default_location {
facility
}
last_seen_at
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"devices": {
"data": [
{
"id": "dev_1a2B3c",
"object": "device",
"type": "scanner",
"status": "active",
"name": "Example",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"manufacturer": "example",
"model": "example",
"serial_number": "example",
"attached_to": {
"facility": "fac_lon_hub",
"vehicle": "veh_van07",
"handling_unit": "example"
},
"capabilities": [
"example"
],
"authentication": {
"method": "mtls",
"certificate_fingerprint": "example",
"expires_at": 1791302400
},
"default_location": {
"facility": "fac_lon_hub"
},
"last_seen_at": 1791302400
}
],
"has_more": true
}
}
}