Metadata endpoints
Endpoints for snapshots, audit events, alerts, health, and admin controls.
/metadata/snapshots metadata:read scopeLists available snapshots. Filter by table name with ?table=users.
curl -H "Authorization: Bearer token" \
"http://localhost:8080/metadata/snapshots?table=users"/metadata/audit metadata:read scopeReturns audit events. Filter with ?agent_id=cursor-local&risk=CRITICAL&limit=50.
/metadata/alerts metadata:read scopeReturns system alerts — bypass detections, sidecar failures, storage issues.
/metadata/health metadata:read scopeReturns component health: gateway, sidecar heartbeat age, storage connectivity, last snapshot age.
{
"gateway": "running",
"sidecar_heartbeat_age_seconds": 34,
"sidecar_status": "healthy",
"last_snapshot_age_seconds": 180,
"storage_accessible": true,
"paused": false
}/metrics metrics:read scopePrometheus metrics endpoint. Exposes gateway throughput, risk distribution, approval rates, and sidecar snapshot lag.
/admin/pause admin:* scopeEmergency pause — stops all write and CRITICAL query execution. Reads (SAFE) continue.
{ "reason": "Suspicious agent behavior — investigating" }/admin/resume admin:* scopeResumes normal operation after a pause.
/admin/status admin:* scopeReturns the current admin state including pause status, reason, and environment info.
/healthUnauthenticated health probe. Returns {"status":"ok"} if the gateway is running.