Returns tenant-scoped aggregates of connection state for the
Agents dashboard summary cards. The response groups the
agent_instances rows by deployment_mode, connection_status,
and transport.
The underlying query hits the
(tenant_id, connection_status) index added in migration 074,
so response time is independent of fleet size for a single
tenant.
Scope rules:
body.tenant_id is silently ignored.tenant_id to scope to a single tenant,
or omit it to aggregate globally across all tenants.agent_type (optional, both roles) narrows to a single fleet.curl --request POST \
--url https://api.svantic.com/agents/get_connection_stats \
--header 'Content-Type: application/json' \
--data '
{
"agent_type": "orchestrator"
}
'{
"ok": true,
"stats": {
"total": 14,
"by_deployment_mode": {
"hosted": 8,
"connected": 6
},
"by_status": {
"online": 5,
"healthy": 7,
"degraded": 1,
"offline": 1
},
"by_transport": {
"ws": 5,
"callback": 7,
"unknown": 2
}
},
"tenant_id": "tenant-acme",
"agent_type": "orchestrator"
}Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Scope filters for POST /agents/get_connection_stats. Both fields are optional. With none set, stats cover the caller's entire tenant.
Aggregated connection counters for the scope.
curl --request POST \
--url https://api.svantic.com/agents/get_connection_stats \
--header 'Content-Type: application/json' \
--data '
{
"agent_type": "orchestrator"
}
'{
"ok": true,
"stats": {
"total": 14,
"by_deployment_mode": {
"hosted": 8,
"connected": 6
},
"by_status": {
"online": 5,
"healthy": 7,
"degraded": 1,
"offline": 1
},
"by_transport": {
"ws": 5,
"callback": 7,
"unknown": 2
}
},
"tenant_id": "tenant-acme",
"agent_type": "orchestrator"
}