List outage incidents
const url = 'https://api.nsin.ir/uptime?domain=example.com&limit=50';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/uptime?domain=example.com&limit=50' \ --header 'Authorization: Bearer <token>'The domain’s sustained origin-outage incidents, most recent first. An
incident opens when a watched scope’s origin-error rate stays above the
domain’s threshold for the whole detection window, and resolves after
recover_min clear minutes.
Incidents come from two sources: the domain’s default whole-host watch,
and each uptime monitor. Read monitor_id / scope_label to tell them
apart.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The domain name (for example example.com). These endpoints take the
domain as a query parameter rather than a path segment.
Example
example.comHow many incidents to return, 1-200. Out-of-range values fall back to the default.
Responses
Section titled “ Responses ”Incident history.
object
object
The monitor that fired. Absent for the domain’s default whole-host watch. Two monitors on one hostname are otherwise indistinguishable in the history.
Human name of the watch — the monitor’s name, or its first
included path when it has none. Empty string for the whole-host
watch.
open while ongoing, resolved once recovered.
Absent while the incident is ongoing.
Highest origin-error percentage reached.
Requests observed over the incident.
Example generated
{ "incidents": [ { "id": 1, "monitor_id": 1, "scope_label": "example", "hostname": "example", "state": "example", "ongoing": true, "started_at": "2026-04-15T12:00:00Z", "resolved_at": "2026-04-15T12:00:00Z", "duration_seconds": 1, "peak_err_pct": 1, "sample_reqs": 1 } ]}The domain query parameter is missing.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "domain is required"}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"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only 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"}