Skip to Content
API ReferenceAPI Reference

API Reference

The Govrix Management API runs on port 4001. It exposes 17 endpoints covering health, agents, events, sessions, costs, and configuration.

Authentication

All endpoints except /health, /ready, and /metrics require a bearer token.

curl -H "Authorization: Bearer $GOVRIX_API_KEY" \ http://localhost:4001/api/v1/agents

GOVRIX_API_KEY must be set in your environment or .env file before starting the proxy. Requests without a valid token receive 401 Unauthorized.

The key is configured at startup via the GOVRIX_API_KEY environment variable. There is no key rotation endpoint in Scout OSS — rotate by restarting with a new value.

Endpoint Overview

MethodPathAuthDescription
GET/healthNoLiveness probe
GET/readyNoReadiness probe (DB connected)
GET/metricsNoPrometheus metrics
GET/api/v1/agentsYesList all agents
GET/api/v1/agents/{id}YesGet agent by ID
PUT/api/v1/agents/{id}YesUpdate agent status / metadata
POST/api/v1/agents/{id}/retireYesRetire an agent
GET/api/v1/agents/{id}/eventsYesEvents for one agent
GET/api/v1/eventsYesList all events
GET/api/v1/events/{id}YesGet event by ID
GET/api/v1/events/sessions/{session_id}YesEvents for a session
GET/api/v1/events/streamYesSSE stream of live events
GET/api/v1/sessionsYesList sessions (Enterprise)
GET/api/v1/sessions/{id}YesSession detail + events (Enterprise)
GET/api/v1/costs/summaryYesTotal cost and tokens, date range
GET/api/v1/costs/breakdownYesCost breakdown by agent
GET/api/v1/configYesCurrent proxy configuration

Base URL

http://localhost:4001

In production, place the Management API behind an internal load balancer or service mesh — it should not be exposed to the public internet.

Last updated on