Monitors

Pause a monitor

Stops its checks; ongoing alerts stay as they are. Pausing a paused monitor changes nothing.

post/monitors/{monitor}/pause

Request

  • Base URL
    https://api.spectate.net/v1
  • Auth
    HTTP bearer

Path parameters

monitorstring uuid required

Monitor ID.

Response

The paused monitor.

idstring uuid required

Monitor ID

labelstring required

Name shown in the dashboard, alerts and status pages

protocol'https' | 'http' | 'icmp' | 'tcp' | 'dns' | 'nameserver' | 'smtp' | 'imap' | 'pop3' | 'heartbeat' required

What a monitor checks, and so the format of its uri.

https <br/> An HTTPS request to the URL in uri, with a certificate check.
http <br/> An HTTP request to the URL in uri.
icmp <br/> A ping (ICMP echo) to the host in uri.
tcp <br/> A TCP connect to host:port, optionally with a TLS handshake and a banner keyword.
dns <br/> A DNS query for a record of the name in uri, optionally compared with expected values.
nameserver <br/> One authoritative nameserver at host:port (port optional, default 53), asked for the SOA record of each zone in advanced_settings.nameserver_zones.
smtp <br/> An SMTP greeting from host:port (port optional), with STARTTLS by default.
imap <br/> An IMAP greeting from host:port (port optional), over TLS by default.
pop3 <br/> A POP3 greeting from host:port (port optional), over TLS by default.
heartbeat <br/> A job calls the monitor's secret ping URL each time it runs. No check goes out, and uri is empty.
uristring required

The target as stored: a URL without the scheme for http and https (the protocol is the scheme), a host for icmp, host:port for tcp and mail, a DNS name for dns. url has the full URL

urlstring required

The target as the dashboard shows it, for example smtp://mail.example.com:587 for SMTP

interval30 | 60 | 120 | 180 | 300 | 600 | 900 | 1800 | 3600 required

Seconds between checks. Plans set the shortest interval a team may use.

primary_location'eu' | 'us' | 'as' | 'oc' required

A region checks run from. A monitor's primary region decides its uptime and alerts (a failed check is repeated from the same region about 5 seconds later before it is marked down); on the Team plan and up the other regions can also measure its response time.

eu <br/> Europe.
us <br/> North America.
as <br/> Asia.
oc <br/> Oceania.
timeoutinteger required

Seconds before a check times out

max_redirectsinteger nullable required

HTTP: redirects followed before the check fails; null follows up to 10

enabledboolean required

Whether the monitor runs. false when paused by a member or by the system (see paused_reason)

paused_reason'plan_limit' | 'team_paused' required

Why the system (not the user) paused a monitor, host, domain or status page.

plan_limit <br/> Over the plan limit (trial expired, downgrade); the oldest resources stay active.
team_paused <br/> The whole team's monitoring is paused (no paid plan, staff action or scheduled deletion).
allow_insecure_requestsboolean required

HTTPS: whether invalid certificates are accepted for the check itself (the certificate check still reports them)

expected_http_status_codestring nullable required

HTTP: status codes that count as up, comma-separated, * as a wildcard digit (2**,301); null accepts 2xx and 3xx

certificate_check_enabledboolean required

Whether the TLS certificate is checked for validity and expiry

certificate_expiry_threshold_daysinteger required

Days before the certificate expires that the "expires soon" alert fires

uses_tlsboolean required

Whether a check reports a certificate: HTTPS, and TCP or mail with TLS

certificate_status'pending' | 'valid' | 'invalid' | 'expires_soon' | 'expired' required

The state of a monitor's TLS certificate, from its latest certificate check.

pending <br/> Not checked yet.
valid <br/> Valid and not about to expire.
invalid <br/> Not trusted, for example self-signed, for another host or with a broken chain.
expires_soon <br/> Valid, but expires within the monitor's certificate_expiry_threshold_days.
expired <br/> Past its expiry date.
certificate_expires_atstring date-time nullable required

When the certificate expires

certificate_valid_fromstring date-time nullable required

When the certificate became valid

certificate_issuerstring nullable required

Who issued the certificate

certificate_errorstring nullable required

Why the certificate isn't valid, with certificate_status invalid or expired

certificate_checked_atstring date-time nullable required

When the certificate was last checked

performance_check_enabledboolean required

Whether slow responses raise alerts (performance_hard_threshold, performance_deviation_percentage)

performance_hard_thresholdinteger nullable required

Milliseconds: a response slower than this raises an alert

performance_deviation_percentageinteger nullable required

Percent: an alert fires when the average response time of the last performance_deviation_timeframe minutes is this much above the average of the performance_deviation_before_timeframe minutes before

performance_deviation_timeframeinteger nullable required

Minutes of recent checks compared (15 to 120, in steps of 15)

performance_deviation_before_timeframeinteger nullable required

Minutes before those that they're compared with (60 to 1440, in whole hours)

regional_performance_enabledboolean required

Also measure response time from the regions other than primary_location, every minute (or at the interval, when longer). Shown with the monitor's performance; not used for uptime or alerts. Team plan and up

uptime_status'pending' | 'up' | 'down' required

Whether a monitor's target answers, from its latest checks.

pending <br/> Not checked yet.
up <br/> The latest check succeeded.
down <br/> Checks fail: a failed check, repeated from the same region about 5 seconds later, failed again.
uptime_status_changed_atstring date-time nullable required

When uptime_status last changed

last_checked_atstring date-time nullable required

When the monitor was last checked

response_timeinteger nullable required

Milliseconds the latest check took

project_idstring uuid nullable required

The project the monitor belongs to; null for none

ping_urlstring nullable required

heartbeat monitors: the secret URL the job calls. Add /fail or the exit code to report a failure. Anyone with the URL can report for the job; rotate it if it leaks

ping_periodinteger nullable required

heartbeat monitors: seconds between the job's runs

ping_graceinteger nullable required

heartbeat monitors: seconds a ping may be late before it counts as missed

ping_timezonestring nullable required

heartbeat monitors: the time zone of the clock the job runs on

ping_alert_afterinteger nullable required

heartbeat monitors: missed runs in a row before the monitor goes down and alerts

ping_severity'critical' | 'high' | 'medium' | 'low' required

How urgent an alert or incident is. Escalation paths can branch on it.

critical <br/> Customers are affected right now.
high <br/> Serious, needs attention soon.
medium <br/> Should be looked at.
low <br/> Informational.
ping_due_atstring date-time nullable required

heartbeat monitors: when the next ping must have arrived; null until the first ping

created_atstring date-time required

When the monitor was created

updated_atstring date-time required

When the monitor's settings last changed

Example response

{
  "label": "Website",
  "uri": "example.com/health",
  "url": "https://example.com/health",
  "timeout": 30,
  "headers": [
    {
      "key": "X-Health-Check",
      "value": "spectate"
    }
  ],
  "advanced_settings": {
    "keyword": "OK",
    "dns_resolver": "1.1.1.1"
  },
  "expected_http_status_code": "2**,301",
  "certificate_expiry_threshold_days": 14,
  "certificate_issuer": "R11",
  "performance_hard_threshold": 2000,
  "performance_deviation_percentage": 50,
  "performance_deviation_timeframe": 30,
  "performance_deviation_before_timeframe": 240,
  "response_time": 182,
  "check_details": {
    "banner": "220 mail.example.com ESMTP",
    "reply_code": 220,
    "tls_version": "TLS 1.3",
    "cipher_suite": "TLS_AES_128_GCM_SHA256",
    "dns_server": "1.1.1.1:53",
    "dns_rcode": "NOERROR",
    "dns_zone": "example.com",
    "dns_nameservers": [
      {
        "host": "ns1.example.com",
        "address": "192.0.2.53",
        "rcode": "NOERROR",
        "serial": 2026110301,
        "response_time": 12,
        "error": "REFUSED"
      }
    ],
    "nameserver_zones": [
      {
        "zone": "example.com",
        "rcode": "NOERROR",
        "serial": 2026110301,
        "response_time": 12,
        "error": "REFUSED"
      }
    ],
    "nameserver_issues": [
      {
        "server": "ns1.example.com:53"
      }
    ]
  },
  "uptime": {
    "twenty_four_hours": 99.95
  },
  "escalation_paths": [
    {
      "name": "On-call engineers"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.