Origin-direction bandwidth across your domains
const url = 'https://api.nsin.ir/analytics/bandwidth-overview?period=3h';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Time window, ending now. Buckets are hourly up to 24h and daily for
7d and 30d. An unrecognised value falls back to 24h.
Responses
Section titled “ Responses ”Bandwidth series and per-domain totals.
object
object
Bytes sent to the origin.
Bytes received from the origin.
object
min(up,down) / max(up,down).
Set when ratio is close to 1.0, which is unusual for web traffic.
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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}The analytics backend is temporarily unreachable. Retry; no data is lost.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "analytics unavailable"}