Skip to content

Per-domain totals with sparkline

GET
/analytics/domains-overview
curl --request GET \
--url 'https://api.nsin.ir/analytics/domains-overview?period=3h' \
--header 'Authorization: Bearer <token>'

Like /analytics/overview, plus an error rate, a small requests-over-time series for sparklines, and the most recent log timestamp seen for each domain.

period
string
default: 24h
Allowed values: 3h 6h 12h 24h 7d 30d

Time window, ending now. Buckets are hourly up to 24h and daily for 7d and 30d. An unrecognised value falls back to 24h.

One entry per domain.

Media type application/json
object
data
Array<object>
object
domain_id
integer
domain_name
string
total_requests
integer
total_bandwidth

Bytes.

integer
error_rate

Share of requests that failed, 0–1.

number
latest_event

Most recent request seen for this domain or any subdomain. Null when there is no traffic.

string format: date-time
series

Requests over time, for a sparkline.

Array<object>
object
timestamp
string format: date-time
count
integer
Example generated
{
"data": [
{
"domain_id": 1,
"domain_name": "example",
"total_requests": 1,
"total_bandwidth": 1,
"error_rate": 1,
"latest_event": "2026-04-15T12:00:00Z",
"series": [
{
"timestamp": "2026-04-15T12:00:00Z",
"count": 1
}
]
}
]
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}

The analytics backend is temporarily unreachable. Retry; no data is lost.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example unavailable
{
"error": "analytics unavailable"
}