Aller au contenu

Lister les agents connectés à l’organisation authentifiée

GET/api/public/v1/agents

Returns one row per agent (one platform used on one host by one OS user in one profile) within the caller's organization, ordered by most-recently-seen first. Includes a 24h verdict breakdown joined from event_stats_daily. Paginated with page/page_size. The five ownership filters (owner / function / org_unit / unattributed / owner_status) narrow the list, and every row carries the six ownership fields (owner_kind / owner_person_id / owner_display_name / owner_status / function / org_unit_path). zone_id, assignment_source, environment, category, control_level and q narrow it further, and every row names the zone that governs the agent (assigned_zone_id, assigned_zone_unit_id, assigned_zone_label, assignment_source).

Fenêtre de terminal
curl --fail-with-body -X GET 'https://app.openlatch.ai/api/public/v1/agents?page=1&page_size=50' \
-H "Authorization: Bearer $OPENLATCH_API_KEY"
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorAutorisé
viewerAutorisé

Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.

Portée de clé d’API : agents:read

ParamètreTypeDescription
pageinteger1-indexed page number
page_sizeintegerPage size (max 200)
platformarray of string or nullFilter to one or more agent platforms (repeat the param)
windowstring — one of 24h, 7d, 30d, 90dRolling window for the per-agent action_mix rollup. One of 24h, 7d, 30d, 90d. Does not affect verdicts_24h, which always reflects the last 24h.
compatibilitystring or nullunavailable narrows to installs whose latest compatibility evidence does not intersect what the platform currently retains.
capability_limitstring — one of cannot_prompt, shell_only or nullNarrow to the agents whose binding limits what an ASK can do: cannot_prompt (its ASKs take the fallback verdict) or shell_only (its refusals reach shell tools only). An install that has not reported is never in either set.
host_idstring or nullNarrow to the agents reporting from one licensed host.
zone_idstring (uuid) or nullNarrow to the agents whose assigned zone (manual pin, else the resolver's) is this zone.
assignment_sourcestring — one of auto, manual or nullmanual — pinned to a zone by hand; auto — the resolver decides.
environmentarray of string or nullNarrow to these environments (repeat the param).
categoryarray of string or nullNarrow to these categories (repeat the param).
control_levelarray of string — one of enforced, monitored, known or nullNarrow to these derived control levels (repeat the param).
qstring or nullFree text over display name, agent id, platform and the owner's display name.
ownerarray of stringAgents whose resolved human owner is any of these directory_people ids (repeat the param).
functionarray of stringAgents whose business function is any of these frozen-enum values (repeat the param). An unknown value is a 400, never an empty list.
org_unitarray of stringAgents whose placement unit (the human owner's unit, else the service-accountable person's unit, else the service-accountable unit) is any of these org_units ids OR any descendant (repeat the param). Descendants are resolved server-side.
unattributedbooleanOnly agents with owner_kind = 'unattributed' (the PRD literal). Deliberately EXCLUDES owner_kind IS NULL (still resolving) and a human owner whose person row is gone.
owner_statusstring or nullOnly 'inactive' is accepted: agents whose owner exists AND is marked inactive in the directory.
ChampTypeDescription
dataarray of objectObligatoire.
data[].action_mixobjectDomain / file / command action counts rolled up from the agent_action_* tables, scoped to the window supplied by the caller (defaults to 24h). Zero across the board means no actionable events were extracted in the window.
data[].action_mix.commandsinteger
data[].action_mix.domainsinteger
data[].action_mix.filesinteger
data[].agent_idstringObligatoire.
data[].assigned_zone_idstring or nullThe zone governing this agent: its manual pin, else the one the resolver gives it.
data[].assigned_zone_labelstring or nullThe assigned zone's org-unit name — the label every zone surface shows.
data[].assigned_zone_unit_idstring or nullThe org unit the assigned zone hangs off.
data[].assignment_sourcestring — one of auto, manualmanual — pinned to a zone by hand; auto — the resolver decides.
data[].budget_sourcestringWhich scope produced budget_usd: agent | subscription_default | org_default | none.
data[].budget_usdstring or nullThe resolved monthly budget - this agent's own row, else the default of the declared subscription that makes it Sanctioned, else the org default. Null when none is set.
data[].categorystring or nullOpen category string; known values coding | analysis | ops | content | service.
data[].control_levelstringenforced (fetched a bundle in the last 24h — evaluating policy locally) | monitored (sent events, no bundle — we see it and cannot stop it) | known (neither). Derived per request, never stored.
data[].display_namestring or null
data[].environmentstringFrozen Environment — production | staging | development | unknown.
data[].first_seen_atstring (date-time)Obligatoire.
data[].functionstring or nullBusiness function (frozen enum; wire name for the ORM's business_function). 'unknown' = not yet classified; null while the resolver has not yet run.
data[].host_idstring or null
data[].instance_qualifierobject or nullWhat tells this agent apart from the other agents of its platform on its host, shown beside the name and never inside it; null for a host's first OS user in their default profile.
data[].last_seen_atstring (date-time)Obligatoire. When the agent last sent activity. For an agent that has never been active (found by discovery, never run since), this is first_seen_at and never_active is true.
data[].latest_agent_versionstring or null
data[].latest_archstring or null
data[].latest_client_versionstring or null
data[].latest_hook_versionstring or null
data[].latest_local_ipv4string or null
data[].latest_local_ipv6string or null
data[].latest_osstring or null
data[].latest_public_ipv4string or null
data[].latest_public_ipv6string or null
data[].mtd_consumption_usdstring or nullMonth-to-date consumption for this agent (pricebook-weighted cost_total, every billing mode). What the budget is measured against. Null when the surface did not compute it; 0 means the agent really has not spent.
data[].never_activebooleanTrue when the agent has never sent any activity (found by discovery and not run since): last_seen_at then repeats first_seen_at and is not a sighting of activity.
data[].org_unit_pathstring or nullSlash-joined path of the agent's placement unit: the human owner's unit, else the service-accountable person's unit, else the service-accountable unit. Null when none applies.
data[].owner_display_namestring or nullThe owner person's display name; null when there is no (or an orphaned) owner person.
data[].owner_kindstring or nullOwnership verdict: human | service | unattributed; null while the resolver has not yet run.
data[].owner_person_idstring or nullThe resolved human owner's directory_people id — the value the owner filter of GET /agents takes (it cannot filter by display name). Null for service / unattributed / resolving.
data[].owner_statusstring or nullThe owner person's directory status (active | inactive); null when there is no owner person.
data[].platformstringObligatoire.
data[].proxy_as_ofstring (date-time) or nullTimestamp of the latest event that actually CARRIED the proxy attributes — not of the latest event overall, so a stale shape is never reported as freshly confirmed. Null until the first carrying event.
data[].proxy_sourcestring or nullHow the client found that route: manual | env | windows | macos | gnome | pac | wpad. Null under the same conditions as proxy_type. Open string, same reason.
data[].proxy_tls_interceptedboolean or nullWhether the client observed the proxy terminating and re-issuing TLS. Null is NOT false: null = never observed (the client omits the attribute until a TLS handshake has actually completed), false = observed and clean.
data[].proxy_typestring or nullEgress proxy type last reported by this agent's client: http | https | socks5 | pac. Null = the agent egresses direct, or never reported one. Open string: the client owns the vocabulary, so an unknown value is stored and returned verbatim rather than rejected.
data[].sessions_countintegerDistinct session count for this agent over the same rolling window as action_mix (defaults to 24h): how many sessions blend into one agent identity, without a per-agent sessions call. Zero means no sessions were active in the window.
data[].stalebooleanThis install's latest compatibility evidence (I-15 plan 02) does not intersect what the platform currently retains. NOT a fourth control level: a stale agent keeps whatever level its last bundle earned it, because 'we stopped serving it' and 'it is not under control' are different facts.
data[].total_events_lifetimeintegerLifetime event count for this agent — sum of event_stats_daily.event_count across every day, never zero-floored to a 24h window. Gives an accurate count for agents idle longer than 24h, for which verdicts_24h shows 0 even when the agent has many events in older sessions.
data[].used_pctnumber or nullmtd_consumption_usd as a percent of budget_usd. Null when there is no budget. A zero budget reports 100 when nothing was spent and 999 otherwise.
data[].verdicts_24hobjectVerdict counts over the last 24h. Zero if no activity.
data[].verdicts_24h.allowintegerActions the policy allowed
data[].verdicts_24h.askintegerActions the policy sent to Ask
data[].verdicts_24h.blockintegerActions the policy blocked
data[].verdicts_24h.totalintegerTotal events in the 24h window
data[].window_consumption_usdstring or nullConsumption for this agent over the request's window (pricebook-weighted cost_total, every billing mode) — the figure the fleet tile prints. Never compare it to budget_usd: a budget is a calendar month. Null when the surface did not compute it; 0 means the agent really has not spent in the window.
pageintegerObligatoire.
page_sizeintegerObligatoire.
totalintegerObligatoire.
{
"data": [
{
"action_mix": {
"commands": 0,
"domains": 0,
"files": 0
},
"agent_id": "agt_01jbwa2k1vfrn9y42xhgxhmzj2",
"assigned_zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"assigned_zone_label": "string",
"assigned_zone_unit_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"assignment_source": "auto",
"budget_source": "none",
"budget_usd": "string",
"category": "string",
"control_level": "known",
"display_name": "release-bot",
"environment": "production",
"first_seen_at": "2026-01-15T14:32:05Z",
"function": "string",
"host_id": "hst_01jbwa2k1vfrn9y42xhgxhmzj2",
"instance_qualifier": {
"os_user": "string",
"profile_suffix": "string",
"user_suffix": "string"
},
"last_seen_at": "2026-01-15T14:32:05Z",
"latest_agent_version": "string",
"latest_arch": "string",
"latest_client_version": "string",
"latest_hook_version": "string",
"latest_local_ipv4": "string",
"latest_local_ipv6": "string",
"latest_os": "string",
"latest_public_ipv4": "string",
"latest_public_ipv6": "string",
"mtd_consumption_usd": "string",
"never_active": false,
"org_unit_path": "Engineering / Platform",
"owner_display_name": "release-bot",
"owner_kind": "string",
"owner_person_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10",
"owner_status": "string",
"platform": "string",
"proxy_as_of": "2026-01-15T14:32:05Z",
"proxy_source": "string",
"proxy_tls_intercepted": false,
"proxy_type": "string",
"sessions_count": 0,
"stale": false,
"total_events_lifetime": 0,
"used_pct": 0.25,
"verdicts_24h": {
"allow": 0,
"ask": 0,
"block": 0,
"total": 0
},
"window_consumption_usd": "string"
}
],
"page": 1,
"page_size": 3,
"total": 3
}