-
-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Trove exposes a small HTTP API.
The API is used by the dashboard and agents. It is also useful for scripts.
Agent report ingest always requires a per-agent bearer token:
Authorization: Bearer <agent-token>When OIDC is enabled, the dashboard/read APIs also require either a valid browser session or the optional TROVE_API_TOKEN bearer token. See Authentication.
/healthz, /oauth2/login, /oauth2/callback, and /oauth2/logout remain unauthenticated by design.
Health check endpoint.
Example:
curl http://SERVER:8080/healthzUse this for container health checks, reverse proxy checks, and uptime monitoring.
Agent report ingest endpoint.
Requires bearer token.
Request body is a model.Report JSON object.
Simplified example:
{
"agent": {
"name": "docker-nuc01",
"platform": "docker",
"version": "0.7.0",
"interval_seconds": 30
},
"host": {
"hostname": "nuc01",
"meta": {
"docker_version": "26.1.0"
}
},
"services": [
{
"external_id": "abc123",
"name": "gitea",
"kind": "container",
"image": "gitea/gitea:latest",
"image_digest": "sha256:...",
"state": "running",
"health": "healthy",
"ports": [
{ "host": 3000, "container": 3000, "proto": "tcp" }
],
"labels": {
"com.docker.compose.project": "gitea"
}
}
]
}Response:
{
"ok": true,
"services": 1
}Validation rules include:
-
agent.namerequired -
agent.platformrequired -
host.hostnamerequired - each service needs
external_id - service
external_idmust be unique within the report - service
kindmust be recognized - service
healthmust be agent-reportable
Agents cannot report health="stale". Stale is server-derived.
Returns catalog services for the dashboard/API.
Auth: OIDC session or TROVE_API_TOKEN when OIDC is enabled.
Example:
curl http://SERVER:8080/api/v1/servicesThe response includes service details joined with host/agent context and derived freshness where available.
Returns known agents and heartbeat information.
Auth: OIDC session or TROVE_API_TOKEN when OIDC is enabled.
Example:
curl http://SERVER:8080/api/v1/agentsUseful for checking whether agents are reporting and what platform/version they run.
Returns recent activity events.
Auth: OIDC session or TROVE_API_TOKEN when OIDC is enabled.
Example:
curl http://SERVER:8080/api/v1/eventsEvents include state, health, and agent transitions.
Returns the current dashboard/API authentication state.
Auth: OIDC session or TROVE_API_TOKEN when OIDC is enabled.
Example:
curl -H "Authorization: Bearer $TROVE_API_TOKEN" http://SERVER:8080/api/v1/meTypical OIDC session response:
{
"authenticated": true,
"via": "oidc",
"email": "user@example.com",
"subject": "..."
}Typical API token response:
{
"authenticated": true,
"via": "api-token"
}Clears the local trove_session cookie and redirects to the provider's OIDC end_session_endpoint when available.
This endpoint is intended for browsers. The dashboard uses a real POST form so the browser follows the IdP logout redirect.
Known service kinds:
containerpodvmlxcprocessdeploymentstatefulsetdaemonset
Agent-reportable health values:
healthyunhealthyunknown
Server-derived health value:
stale
Agents do not send removed.
The server sets:
state = "removed"
when a previously known service is absent from a full-state report.