nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Uptime

Current origin-error status per subdomain

gethttps://api.nsin.ir/uptime/live

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

What is happening right now, per watched scope, over the domain's detection window — including hosts that are erroring but have not (yet) crossed the alert thresholds. Distinct from /uptime, which lists only sustained outages.

One hostname may appear on several rows: the whole-host watch (monitor_id: 0) plus one row per uptime monitor that matches it, each measured over its own traffic. Key on (hostname, monitor_id).

Query parameters

  • domainstringrequiredquery

    The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

Responses

200Live status.

Content type: application/json

  • window_mininteger

    Length of the trailing window, in minutes.

  • hostsarray of UptimeLiveStatus
    Item fields
    • hostnamestring
    • monitor_idinteger

      The monitor this row belongs to; 0 for the domain's default whole-host watch. One hostname can appear on several rows — one per matching monitor, plus the whole-host row — so key on (hostname, monitor_id), never on hostname alone.

    • monitor_namestring

      Empty for the whole-host watch.

    • scope_labelstring

      Human name of the watch, so two rows for one hostname do not read as duplicates. Empty for the whole-host watch.

    • requestsinteger
    • errorsinteger

      Origin-attributable 5xx responses.

    • error_pctnumber

      Origin-error percentage across the window.

    • downboolean

      Currently meets this domain's alert thresholds.

    • incidentboolean

      An incident is currently open for this scope.

json
{
  "window_min": 0,
  "hosts": [
    {
      "hostname": "string",
      "monitor_id": 0,
      "monitor_name": "string",
      "scope_label": "string",
      "requests": 0,
      "errors": 0,
      "error_pct": 0,
      "down": true,
      "incident": true
    }
  ]
}
400The domain query parameter is missing.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "domain is required"
}
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/uptime/live?domain=example.com" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc