Skip to main content

Devices Domain

The Devices domain provides endpoints for querying devices registered within a client organization. Devices are machines running the desktop agent. They are identified by a stable id and may be associated with one or more users over time via the user_devices junction table.

For embedding and endpoint design decisions, see the Design Guidelines.

Endpoints

EndpointMethodDescription
List DevicesGETPaginated list of devices. Use for inventory tables and search.
Get DeviceGETFetch a single device directly by ID.
Device SummaryGETFleet-level aggregate stats: total count, agent versions, deployment errors.
Device UsersGETUsers observed on a specific device.
Device DeploymentsGETEnrollment deployment history for a device.

Getting Devices by User

To retrieve devices used by a specific user, use the List Devices endpoint with the user_id filter:

GET /clients/{client_id}/devices?user_id=a1d97031-04e2-4907-a249-093f7436207b

Devices are not embedded in user responses because a user can use many devices over time -- an unbounded, paginated relationship. See Why devices are not embedded below.

Data Transfer Objects (DTOs)

DeviceRef

Minimal device reference for embedding inside other domain responses (e.g. as a cross-domain link). Contains only fields available directly from the devices table that are useful in a reference context. No joins required.

{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"name": "DESKTOP-DEV-ALICE",
"status": "active",
"os_name": "Windows",
"os_version": "10.0.19045",
"last_seen_at": "2026-02-24T21:23:53.082Z"
}
FieldTypeNullableDescription
idstring (uuid)NoStable unique identifier for the device
namestringYesDevice hostname or friendly name
statusstringYesLast known device status: active, inactive, pending
os_namestringYesOperating system name (e.g. Windows, macOS, Linux)
os_versionstringYesOperating system version string
last_seen_atstring (ISO 8601)YesWhen the device last sent a heartbeat

DB source: devices.id, devices.name, devices.status, devices.os_name, devices.os_version, devices.last_seen_at_utc

Used in: Any domain response that references a device as a non-primary resource.


Device

Full device representation returned by device-primary endpoints. Extends DeviceRef with hardware specs, browser extension versions, agent info, and audit timestamps.

{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"name": "DESKTOP-DEV-ALICE",
"status": "active",
"serial_number": "5CG1234567",
"unique_key": "DESKTOP-DEV-ALICE-HWID-5CG1234567",
"os_name": "Windows",
"os_version": "10.0.19045",
"last_seen_at": "2026-02-24T21:23:53.082Z",
"installed_at": "2025-11-01T08:00:00.000Z",
"agent_version": "1.2.3",
"hardware": {
"manufacturer": "Dell Inc.",
"model": "XPS 15 9520",
"cpu_model": "Intel(R) Core(TM) i7-12700H",
"cpu_cores": 8,
"ram": 17179869184
},
"extensions": {
"chrome": {
"version": "1.11.0",
"installed": true,
"auto_update": true,
"last_activity_at": "2026-02-24T21:23:53.082Z"
},
"edge": {
"version": "1.11.0",
"installed": true,
"auto_update": false,
"last_activity_at": "2026-02-24T21:22:00.000Z"
},
"firefox": {
"version": null,
"installed": false,
"auto_update": false,
"last_activity_at": null
}
},
"created_at": "2025-11-01T08:00:00.000Z",
"updated_at": "2026-02-24T21:23:53.082Z"
}
FieldTypeNullableDescription
All DeviceRef fieldsid, name, status, os_name, os_version, last_seen_at -- see DeviceRef
serial_numberstringYesDevice serial number reported by the agent
unique_keystringYesUnique hardware fingerprint used to identify the device
installed_atstring (ISO 8601)YesWhen the agent was first installed on this device
agent_versionstringYesCurrently installed agent version
hardwareobjectNoHardware specifications
hardware.manufacturerstringYesDevice manufacturer (e.g. Dell Inc., Apple Inc.)
hardware.modelstringYesDevice model name
hardware.cpu_modelstringYesCPU model string
hardware.cpu_coresintegerYesNumber of CPU cores
hardware.ramintegerYesTotal RAM in bytes
extensionsobjectNoBrowser extension installation status
extensions.chromeobjectNoChrome extension details
extensions.edgeobjectNoEdge extension details
extensions.firefoxobjectNoFirefox extension details
extensions.{browser}.versionstringYesInstalled extension version. null if not installed.
extensions.{browser}.installedbooleanNoWhether the extension is installed
extensions.{browser}.auto_updatebooleanNoWhether the extension is set to auto-update
extensions.{browser}.last_activity_atstring (ISO 8601)YesLast activity timestamp for this extension
created_atstring (ISO 8601)NoWhen this device record was first created
updated_atstring (ISO 8601)NoWhen this device record was last modified

DB source:

DTO FieldDB Column
(DeviceRef fields)see DeviceRef
serial_numberdevices.serial_number
unique_keydevices.unique_key
installed_atdevices.installed_at_utc
agent_versiondevices.agent_version
hardware.manufacturerdevices.manufacturer
hardware.modeldevices.model
hardware.cpu_modeldevices.cpu_model
hardware.cpu_coresdevices.cpu_cores
hardware.ramdevices.ram
extensions.chrome.versiondevices.chrome_extension_version
extensions.chrome.installeddevices.chrome_extension_installed
extensions.chrome.auto_updatedevices.chrome_extension_auto_update
extensions.chrome.last_activity_atdevices.last_chrome_activity_utc
extensions.edge.versiondevices.edge_extension_version
extensions.edge.installeddevices.edge_extension_installed
extensions.edge.auto_updatedevices.edge_extension_auto_update
extensions.edge.last_activity_atdevices.last_edge_activity_utc
extensions.firefox.versiondevices.firefox_extension_version
extensions.firefox.installeddevices.firefox_extension_installed
extensions.firefox.auto_updatedevices.firefox_extension_auto_update
extensions.firefox.last_activity_atdevices.last_firefox_activity_utc
created_atdevices.created_at
updated_atdevices.updated_at

Omitted internal fields: client_id (in URL path), partner_id, created_by, updated_by, cpu_avg_percent, cpu_min_percent, cpu_max_percent, ram_avg_mb, ram_min_mb, ram_max_mb, resource_recorded_at_utc (metrics -- not device identity)

Used in: Get Device, List Devices


DeviceUserRef

A user observed on a device, returned by Device Users. Wraps UserRef with the junction-level last_seen_at from user_devices.

The user identity fields (UserRef) come from the users table. The enrolled_at and last_seen_at fields come from the user_devices junction table and are specific to this device-user pairing.

{
"id": "a1d97031-04e2-4907-a249-093f7436207b",
"username": "mikechang",
"user_key": "mikechang",
"last_activity": {
"at": "2026-02-24T21:23:53.082Z",
"desktop_at": "2026-02-22T08:00:00.000Z",
"web_at": "2026-02-24T21:23:53.082Z"
},
"enrolled_at": "2025-11-01T08:00:00.000Z",
"last_seen_at": "2026-02-24T21:23:53.082Z"
}
FieldTypeNullableDescription
All UserRef fieldsid, username, user_key, last_activity -- see UserRef
enrolled_atstring (ISO 8601)NoWhen this user was first associated with this device
last_seen_atstring (ISO 8601)YesWhen this user was last seen on this device

DB source:

DTO FieldDB Column
(UserRef fields)see UserRef
enrolled_atuser_devices.created_at
last_seen_atuser_devices.last_seen_at_utc

Used in: Device Users


DeviceDeploymentRef

Minimal deployment reference for list views. Represents a single enrollment deployment event for a device.

{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"status": "success",
"enrollment_date": "2026-01-30T14:30:00.000Z"
}
FieldTypeNullableDescription
idstring (uuid)NoUnique deployment event identifier
statusstringYesDeployment status: success, error, pending
enrollment_datestring (ISO 8601)YesWhen the device was enrolled via this deployment

DB source: device_deployments.id, device_deployments.status, device_deployments.enrollment_date

Used in: Deployment list endpoint


DeviceDeployment

Full deployment record returned by the deployment detail endpoint. Extends DeviceDeploymentRef with the enrollment token reference, error logs, and audit timestamps.

{
"id": "d1e2f3a4-b5c6-7890-abcd-ef1234567890",
"status": "error",
"enrollment_date": "2026-01-30T14:30:00.000Z",
"enrollment_token_id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
"user_id": "a1d97031-04e2-4907-a249-093f7436207b",
"error_logs": [
"2026-01-30T14:30:05Z: Downloading agent package...",
"2026-01-30T14:30:15Z: Installation failed - insufficient permissions",
"2026-01-30T14:30:15Z: Deployment aborted"
],
"created_at": "2026-01-30T14:30:00.000Z",
"updated_at": "2026-01-30T14:30:15.000Z"
}
FieldTypeNullableDescription
All DeviceDeploymentRef fieldsid, status, enrollment_date -- see DeviceDeploymentRef
enrollment_token_idstring (uuid)NoThe enrollment token used for this deployment
user_idstring (uuid)YesThe user associated with this deployment
error_logsstring[]YesDeployment log entries (chronological). null or empty for successful deployments.
created_atstring (ISO 8601)NoWhen this deployment record was created
updated_atstring (ISO 8601)NoWhen this deployment record was last modified

DB source:

DTO FieldDB Column
(DeviceDeploymentRef fields)see DeviceDeploymentRef
enrollment_token_iddevice_deployments.enrollment_token_id
user_iddevice_deployments.user_id
error_logsdevice_deployments.error_logs
created_atdevice_deployments.created_at
updated_atdevice_deployments.updated_at

Omitted internal fields: device_id (in URL path), created_by, updated_by

Used in: Deployment detail endpoint


Why devices are not embedded

User does not include a devices array. This is intentional:

RelationshipCardinalityStrategyReason
User → Devices1:many (unbounded)GET /devices?user_id=Unbounded, needs pagination
Device → Users1:many (usually 1–3)GET /devices/{id}/usersSub-resource with junction context

The device-to-user relationship uses a sub-resource endpoint (/devices/{id}/users) rather than a filter because it is device-primary -- the device is the subject. The user-to-device direction uses the filter pattern (/devices?user_id=) to stay consistent with V2's filter-based cross-resource queries.

To get devices for a user:

GET /clients/{client_id}/devices?user_id=a1d97031-04e2-4907-a249-093f7436207b