Analytics API
FonProxy analytics endpoints: traffic charts, request counts, concurrency, domain breakdown, errors, and websites.

For authentication and common headers, see API General.
All chart and breakdown endpoints accept from and to as ISO 8601 date strings (max 2 month range).
Optional filters: domain (exact match), orderId (ID).
Ingestion
Ingest Logs Auth required
POST /analytics/ingest
Push pre-aggregated request logs from proxy workers.
Request Body
{
"logs": [
{
"ts": "2026-03-15 10:15:00",
"user_id": 1,
"order_id": 3,
"port": 443,
"protocol": "HTTPS",
"ip_out": "185.199.100.10",
"ip_from": "78.100.50.12",
"peer_id": "peer-001",
"worker": "worker-01",
"domain": "google.com",
"error": "",
"count": 12,
"bytes_sent": 10240,
"bytes_received": 524800,
"error_count": 0,
"duration_ms": 15000,
"max_concurrency": 5
},
...
]
}Response
204 No Content
Charts
Traffic Chart Auth required
GET /analytics/traffic
Chart data β bytes sent/received over time.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
from | string | Start date (ISO 8601) | Yes |
to | string | End date (ISO 8601) | Yes |
domain | string | Filter by exact domain | No |
orderId | string | Filter by order | No |
Response
{
"data": [
{
"bucket": "2026-03-15 00:00:00",
"total_bytes_sent": "1048576",
"total_bytes_received": "52428800",
"bytes_total": "53477376",
"total_count": "1542"
},
...
]
}Requests Chart Auth required
GET /analytics/requests
Chart data β request count over time.
Query Parameters
Same as Traffic Chart.
Response
{
"data": [
{
"bucket": "2026-03-15 00:00:00",
"total_count": "1542",
"total_errors": "23"
},
...
]
}Concurrency Chart Auth required
GET /analytics/concurrency
Chart data β concurrency over time.
Query Parameters
Same as Traffic Chart.
Response
{
"data": [
{
"bucket": "2026-03-15 00:00:00",
"max_concurrency": "48",
"total_count": "1542"
},
...
]
}Breakdowns
Domain Breakdown Auth required
GET /analytics/domains
Top domains by bytes or request count.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
from | string | Start date (ISO 8601) | Yes |
to | string | End date (ISO 8601) | Yes |
sortBy | string | Sort by: bytes or count. Default bytes | No |
limit | number | Max results (1β100). Default 30 | No |
orderId | string | Filter by order | No |
Response
{
"data": [
{
"domain": "google.com",
"total_count": "5420",
"bytes_total": "268435456",
"total_bytes_sent": "5242880",
"total_bytes_received": "263192576",
"total_errors": "12"
},
...
]
}Error Breakdown Auth required
GET /analytics/errors
Error breakdown grouped by error type.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
from | string | Start date (ISO 8601) | Yes |
to | string | End date (ISO 8601) | Yes |
domain | string | Filter by exact domain | No |
orderId | string | Filter by order | No |
limit | number | Max results (1β100). Default 50 | No |
Response
{
"data": [
{
"error": "ECONNREFUSED",
"total_errors": "142",
"first_seen": "2026-02-01 08:15:00",
"last_seen": "2026-03-19 22:45:00",
"sample_domains": ["google.com", "facebook.com", "github.com"]
},
...
]
}Websites
Websites List Auth required
GET /analytics/websites
Visited websites β paginated list of distinct domains.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
from | string | Start date (ISO 8601) | Yes |
to | string | End date (ISO 8601) | Yes |
domain | string | Filter by exact domain | No |
orderId | string | Filter by order | No |
page | number | Page number. Default 1 | No |
limit | number | Items per page (1β100). Default 25 | No |
Response
{
"data": [
{
"domain": "google.com",
"total_count": "5420",
"bytes_total": "268435456",
"first_visit": "2026-02-01 08:15:00",
"last_visit": "2026-03-19 22:45:00"
},
...
],
"page": 1,
"limit": 25,
"total": 48,
"totalPages": 2
}