HTTP API

The endpoints the dashboard uses, and the fields of a recorded row.

GET /api/usage
Every recorded row as a JSON array: this machine's, then any pulled in by sync. Each row carries device; remote rows also id and device_id.
GET /api/config
How the instance is wired: listen, data, local rows, log bytes, started (Unix milliseconds), version, providers and their upstreams, and implicit harnesses. Setup and doctor use this endpoint to identify Garcon and compare installed and running versions.
GET /api/settings
settings (switch, device name, URL, key_set) and status (device id, pushed and pending counts, last push and pull, errors, rows from other devices, the devices table).
PUT /api/settings
Send sync_enabled, device_name and url, with optional key, as JSON. key absent keeps the stored key, "" clears it. Probes the table when the switch is on and answers 400 with the reason instead of saving. Requires Content-Type: application/json and a loopback Host.

For setup from a terminal, prefer garcon doctor for diagnostics and garcon connect-supabase --project-url URL --key-stdin for joining a project. Pass the key through stdin from a password manager or protected file. These commands use the local API; see the join example.

Row fields

time (unix ms), harness, account, provider, model, status, ms, input, cache_read, cache_write, output, plus optional connection timings the proxy measures for itself: queue_us, reused, connect_ms, dns_ms, tcp_ms, tls_ms, first_byte_ms. Absent means not measured, never zero.