Get outage-detection settings
const url = 'https://api.nsin.ir/uptime/settings?domain=example.com';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/settings?domain=example.com' \ --header 'Authorization: Bearer <token>'The domain’s outage-detection settings: the thresholds, with the valid
range for each in bounds; the subdomain scope of the default
whole-host watch (uptime_host_*); and the alert channels’ master
switches (notify_email, notify_sms, notify_webhook) with
webhook_configured. The switches gate every recipient at once — the
owner and each member — on top of each person’s own notification
preferences. The webhook URL and secret are not included here; read
them with GET /uptime/webhook. Requires analytics.view.
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.comResponses
Section titled “ Responses ”Current settings.
object
Whether outage alerts are sent for this domain.
Per-minute origin-error percentage that counts as down.
Minutes the host must stay down before an incident opens.
Traffic floor — below this, no incident opens.
Minimum populated one-minute buckets required in the window.
Consecutive clear minutes before an incident resolves.
How uptime_host_includes / uptime_host_excludes are read. Empty
when no host filter is set, which is the default and means every
subdomain is watched.
Which subdomains the default whole-host watch covers. null or empty
means all of them. Same syntax as a rule’s host scope.
Subdomains excluded from the whole-host watch. Excludes beat includes.
Master switch for email alerts on this domain. It applies to the owner
and to every member, on top of each member’s own preferences. Default
true.
Master switch for SMS alerts. Default true. SMS also needs a plan
with uptime_sms — on a plan without it no SMS is sent, whatever
this says.
Whether outage events are POSTed to the domain’s webhook. Default false.
Whether a webhook URL is saved. The URL itself and the signing secret
are served by GET /uptime/webhook, which needs domain.settings.
Valid range for each configurable field.
object
Lowest accepted threshold_pct.
Highest accepted threshold_pct.
Lowest accepted window_min.
Highest accepted window_min.
Lowest accepted min_requests.
Lowest accepted recover_min.
Highest accepted recover_min.
Example
{ "uptime_host_match_type": ""}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"}