Origin-direction bandwidth across your domains
const url = 'https://api.nsin.ir/analytics/bandwidth-overview?period=1h';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=1h' \ --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. Time series are bucketed by minute for 1h,
by hour up to 48h, and by day for 7d and 30d. Buckets are cut on
Asia/Tehran (UTC+03:30) boundaries and emitted as UTC instants, so an
hourly bucket starts at :30 UTC. 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. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
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"}Either the analytics backend is temporarily unreachable (retry; no data
is lost), or the answer is still being computed. The per-domain
sections and the cached account-wide views (domains-overview,
global-summary, global-summary/peak, requests-compare,
bandwidth-overview, nodes-overview) wait at most about 25 seconds
for their query; past that they answer 503 with pending: true and
a Retry-After header, while the query keeps running and caches its
result, so the retry is served from that cache instead of starting the
same scan again. Identical concurrent requests share one computation.
object
Human-readable description of what went wrong.
true when the query is still running rather than
failing. Retry after Retry-After seconds.
Examples
{ "error": "analytics unavailable"}{ "error": "still computing — try again in a few seconds", "pending": true}Headers
Section titled “Headers ”Example
5Seconds to wait before retrying. Sent only with pending.