REST API Reference
The API is available at http://127.0.0.1:8081/api when the proxy is running.
All endpoints are served from the same port as the web UI.
GET /api/requests
Query captured requests. Returns paginated results.
Query parameters match the CLI requests command:
| Parameter | Description |
|---|---|
host | Filter by hostname (substring match) |
status | Filter by HTTP status code |
method | Filter by HTTP method |
content_type | Filter by content type |
search | Search URLs (substring match) |
since | After this time (Unix ms or ISO date) |
until | Before this time (Unix ms or ISO date) |
limit | Maximum number of results (default: 100) |
offset | Pagination offset |
# All requests
curl http://127.0.0.1:8081/api/requests
# Filtered
curl "http://127.0.0.1:8081/api/requests?host=example.com&status=200&limit=50" Response:
{
"data": [
{
"id": "...",
"timestamp": 1700000000000,
"method": "GET",
...
}
],
"total": 142,
"limit": 100,
"offset": 0
} GET /api/requests/:id
Get full details for a single request, including headers and base64-encoded bodies.
curl http://127.0.0.1:8081/api/requests/a1b2c3d4-e5f6-7890-abcd-ef1234567890 DELETE /api/requests
Delete all captured traffic.
curl -X DELETE http://127.0.0.1:8081/api/requests GET /api/status
Get proxy status.
curl http://127.0.0.1:8081/api/status Response:
{
"running": true,
"proxyPort": 8080,
"requestCount": 142,
"dbSizeBytes": 3358720
} GET /api/ca.crt
Download the RoxyProxy CA certificate. Useful for installing on mobile devices -- open this URL in the device's browser to trigger a certificate install prompt.
curl -O http://127.0.0.1:8081/api/ca.crt POST /api/proxy/start
Start the proxy server.
curl -X POST http://127.0.0.1:8081/api/proxy/start POST /api/proxy/stop
Stop the proxy server. The API remains available after stopping the proxy.
curl -X POST http://127.0.0.1:8081/api/proxy/stop POST /api/replay
Replay a previously captured request.
curl -X POST http://127.0.0.1:8081/api/replay \
-H "Content-Type: application/json" \
-d '{"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"}' GET /api/events
Server-Sent Events stream for real-time updates.
curl -N http://127.0.0.1:8081/api/events Events are named:
event: request-- new captured request (data is the request record as JSON)event: status-- proxy state change (data includes running state and proxy port)
POST /api/shutdown
Shut down the entire process (proxy + API + web UI).
curl -X POST http://127.0.0.1:8081/api/shutdown Related
- CLI Reference - CLI equivalent of every API endpoint
- Architecture - How the API fits into the system
- Web UI - Visual interface powered by this API
- HTTPS Interception - CA certificate details for the /api/ca.crt endpoint
- AI Agent Plugin - Programmatic access to traffic for AI agents
- Capture iOS Traffic - Mobile CA certificate installation via /api/ca.crt