Skip to content

Returns a list of all configured agents including the local agent and remote agents

GET
/api/agents

Auto-generated from server.go. Handler: s.handleGetAgents.

Successful response

Returns a list of all configured agents including the local agent and remote agents.

Schema hand-corrected in Session 9: original lift only saw 3 fields (action_endpoint, agent_id, healthy) but the handler emits 5 (adds last_seen, last_error with omitempty). action_endpoint is empty on the local agent and is also omitempty in spirit (always present in the wire shape today, but only meaningful for remotes).

object
agents
required
Array<object>
object
agent_id
required
string
action_endpoint
required

Empty string for the local agent (added first with only AgentID + Healthy set). Non-empty URL for remote agents.

string
healthy
required
boolean
last_seen

RFC3339-ish timestamp (“2006-01-02T15:04:05Z”). Only emitted for remote agents whose LastSeen is non-zero; the local agent and never-seen remotes omit it.

string
last_error

Most-recent dispatch error for the agent. Empty/omitted when no error. Only set for remote agents.

string
deployment_mode
required
string
local_agent_id
required
string

Authentication is required or the supplied token is invalid.

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string

Internal server error

Standardised error envelope per RFC 7807. Many existing endpoints still return an older shape (e.g. {"error": "..."}). This schema documents the target shape; legacy endpoints will be migrated in Phase 70. Per D-21 the spec describes current behaviour without enforcing the migration here.

object
type

A URI reference that identifies the problem type.

string format: uri-reference
default: about:blank
title

A short human-readable summary of the problem.

string
status

The HTTP status code generated by the origin server.

integer format: int32
>= 100 <= 599
detail

A human-readable explanation specific to this occurrence.

string
instance

A URI reference that identifies the specific occurrence.

string format: uri-reference
error

Legacy error message field. Will be removed once handlers are migrated.

string
details

Legacy per-field error details. Will be removed once handlers are migrated.

object
key
additional properties
string
requestId

The request id middleware-assigned identifier for tracing.

string