Reference for the Admin API endpoints that let you query request logs, account stats, and DB metadata programmatically from your own scripts or tooling.
The Admin API lets you query request history and account stats programmatically. It is the same data that powers the built-in admin UI at /admin, accessible as JSON so you can integrate it into your own scripts or monitoring tools.
Access rules differ based on where requests originate:
Origin
Requirement
Loopback (localhost, 127.0.0.1, ::1)
No token required
Remote (any other hostname or IP)
Requires ADMIN_TOKEN set on the server
When ADMIN_TOKEN is set on the server, pass it in one of these headers:
Header
Format
x-admin-token
x-admin-token: <token>
Authorization
Authorization: Bearer <token>
Tokens in URL query parameters are not supported.
If you see 403 Forbidden, the admin API is restricted to localhost and ADMIN_TOKEN is not set. If you see 401 Unauthorized, ADMIN_TOKEN is set but the request did not include a valid token.
Returns the current server configuration. You can also use POST /api/admin/config to update configuration values without restarting the server. Changes made via the API are validated and applied immediately.
# Read current configcurl http://localhost:4141/api/admin/config# Update a config value (example: change logLevel)curl -X POST http://localhost:4141/api/admin/config \ -H "Content-Type: application/json" \ -d '{"logLevel": "debug"}'
Unknown keys are rejected. Only fields documented in the configuration reference are accepted.
The proxy stores metadata only — no GitHub or Copilot tokens, and no request or response content. Logs are retained for 14 days and the database is capped at 200,000 rows. Older entries are cleaned up automatically.