Skip to content

Origin-direction bandwidth across your domains

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

Bytes sent to and received from origins, as a time series plus per-domain totals.

ratio is min(up,down) / max(up,down). A value near 1.0 means the domain pushes about as much to the origin as it pulls back, which is unusual for web traffic (downloads normally dominate) and sets flagged.

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.

Bandwidth series and per-domain totals.

Media type application/json
object
series
Array<object>
object
timestamp
string format: date-time
up

Bytes sent to the origin.

integer
down

Bytes received from the origin.

integer
domains
Array<object>
object
domain
string
up
integer
down
integer
ratio

min(up,down) / max(up,down).

number
flagged

Set when ratio is close to 1.0, which is unusual for web traffic.

boolean
Example generated
{
"series": [
{
"timestamp": "2026-04-15T12:00:00Z",
"up": 1,
"down": 1
}
],
"domains": [
{
"domain": "example",
"up": 1,
"down": 1,
"ratio": 1,
"flagged": true
}
]
}

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"
}