List agents of an organization
const url = 'https://api.perstat.io/organizations/example/agents';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.perstat.io/organizations/example/agents \ --header 'Authorization: Bearer <token>'Returns the enrolled agents of the organization with hostname, platform, version, online state, last heartbeat, and the latest CPU, memory, and disk readings. Each entry also carries monitor_count, the number of active monitors bound to that agent, which are the monitors that would be archived if the agent were removed. Any organization member may read the list.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”object
Opt-in: Prozessnamen-Inventar übertragen (erweiterte Konfiguration).
Neueste verfügbare Agent-Version (für „Update verfügbar“-Hinweis).
Aktive Monitore, die auf diesen Agenten zeigen. Der Entfernen-Dialog
muss VOR dem Klick sagen können, wie viele davon mit archiviert werden
(siehe revoke_agent) — „N Monitore verschwinden gleich mit“ ist keine
Nachricht, die man erst hinterher bekommen darf.
Heartbeat jünger als 180 s (3× Push-Intervall) → online.
Agent-Version liegt hinter latest_version.
Zuletzt übertragenes Inventar (nur Prozessnamen) + Zeitpunkt; fürs Transparenz-Panel und die Vorschläge im Dienst-Monitor-Formular.
Examplegenerated
[ { "agent_version": "example", "arch": "example", "enrolled_at_unix": 1, "hostname": "example", "id": "example", "inventory_enabled": true, "labels": "example", "last_cpu_pct": 1, "last_disk_pct": 1, "last_heartbeat_at_unix": 1, "last_mem_pct": 1, "latest_version": "example", "modules": [ "example" ], "monitor_count": 1, "online": true, "os": "example", "outdated": true, "platform": "example", "process_inventory": [ "example" ], "process_inventory_at_unix": 1 }]