Skip to main content

Devices and Agents

A project-scoped API key can list the devices and LLM agents registered on its project. Listing is all it can do: a key can never register, configure, suspend or rotate a device or agent, and no route on this surface ever returns a credential.

Both routes live under the project configuration API, /config/v1/, and require a key carrying the inventory:read scope.

GET /config/v1/devices HTTP/1.1
Host: api.medbackend.com
Authorization: Bearer <your-project-api-key>

The inventory:read scope​

inventory:read is opt-in — it is not granted to a key by default and must be selected explicitly when the key is created.

Only a project member who can already see both the device list and the agent list in the dashboard may issue a key with this scope. In practice that is a Project Administrator or the project owner. A key stops authenticating as soon as its issuer is removed from the project, is deactivated, or loses access to devices or agents — no separate revocation step is needed.

A config:read or config:write key does not grant access to these routes; only inventory:read does.

GET /config/v1/devices​

Returns the project's devices.

{
"devices": [
{
"id": 42,
"name": "ward-3-vitals-monitor",
"description": "Bedside vitals monitor, ward 3",
"device_type": "medical_device",
"status": "active",
"created_at": "2026-06-01T09:12:00.123456+00:00",
"has_agent": true,
"agent_health_status": "healthy",
"agent_last_health_check": "2026-09-30T08:00:00.123456+00:00"
}
]
}
FieldDescription
idDevice id
nameDevice name
descriptionDevice description, empty string if none was set
device_typeOne of medical_device, iot_sensor, mobile_application, ai_model, other
statusactive or inactive
created_atWhen the device was registered, ISO 8601 with UTC offset
has_agentWhether an agent proxy endpoint is configured for this device (separate from the LLM agents listed by GET /config/v1/agents)
agent_health_statusHealth of this device's agent proxy endpoint: healthy, unhealthy, or null if no health check has run yet, or if no agent proxy endpoint is configured
agent_last_health_checkTimestamp of the agent proxy endpoint's last health check, ISO 8601 with UTC offset, or null on the same conditions as above

GET /config/v1/agents​

Returns the project's LLM agents.

{
"agents": [
{
"agent_name": "triage-summarizer",
"health_status": "healthy",
"last_health_check": "2026-09-30T08:00:00.123456+00:00",
"timeout_seconds": 90,
"created_at": "2026-05-14T11:03:00.123456+00:00",
"updated_at": "2026-09-20T16:45:00.123456+00:00"
}
]
}
FieldDescription
agent_nameAgent name, unique within the project
health_statushealthy, unhealthy, or null if no health check has run yet
last_health_checkTimestamp of the last health check, ISO 8601 with UTC offset, or null if none has run
timeout_secondsRequest timeout configured for this agent, in seconds
created_atWhen the agent was created, ISO 8601 with UTC offset
updated_atWhen the agent's configuration was last changed, ISO 8601 with UTC offset

What these routes never return​

Neither route returns a device's or agent's credentials, endpoint URL or custom headers, or the user who registered it. Devices and agents can only be registered, modified, suspended or rotated through the dashboard — there is no way to do any of that through a key.

Status codes​

StatusWhen
200Request succeeded
401The key is missing, malformed, or no longer valid (including a key whose issuer has lost the access needed to hold its scope — see above)
403The key is valid but does not carry inventory:read — this includes a dashboard session token, which these routes do not accept at all
405Any method other than GET, HEAD or OPTIONS