-
-
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_VALUEWhen 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. /metrics follows the same OIDC/API-token protection as the read APIs.
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.13.0",
"interval_seconds": 30
},
"host": {
"hostname": "nuc01",
"meta": {
"docker.version": "26.1.0",
"docker.api_version": "1.45"
}
},
"services": [
{
"external_id": "abc123",
"name": "gitea",
"kind": "container",
"image": "gitea/gitea:latest",
"image_digest": "sha256:...",
"state": "running",
"health": "healthy",
"health_detail": "",
"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
stateis required and cannot beremoved - 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.
Optional query parameters:
-
limit: positive integer, capped at500 -
offset: non-negative integer; withoutlimit, Trove uses500 -
since: Unix timestamp or RFC3339 time, filtering onupdated_at
When pagination or filtering is used, the response includes a pagination object with limit, offset, count, and next_offset when another page may exist.
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.
Events default to the newest 100 rows. Optional query parameters are limit (maximum 500), offset, kind, and since (Unix timestamp or RFC3339).
Returns the current dashboard/API authentication state.
Auth: OIDC session or TROVE_API_TOKEN when OIDC is enabled.
Example:
TROVE_API_TOKEN=TROVE_API_TOKEN_VALUE \
curl --oauth2-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.
Returns Prometheus text format. When OIDC is enabled, use TROVE_API_TOKEN for scrapes.
Current metric families include process uptime/memory/goroutines, accepted reports, SQLite database size, agent status, service health/state/kind, event counts, and image freshness verdicts. See the in-repo API documentation for the exact metric names and a scrape example.
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.