{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/statoss-com/json-schema/statoss-com-monitor-input-schema.json",
  "title": "MonitorInput",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/statoss-com-openapi.json#/components/schemas/MonitorInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "1 to 80 characters. Left out on a new monitor, the host of url or host. Required for heartbeat and component.",
      "maxLength": 80
    },
    "type": {
      "type": "string",
      "description": "http unless given. Cannot change after creation.",
      "enum": [
        "http",
        "tcp",
        "dns",
        "ping",
        "certificate",
        "domain",
        "heartbeat",
        "component"
      ]
    },
    "url": {
      "type": "string",
      "description": "http: a URL, http or https. Without a scheme, https:// is added."
    },
    "host": {
      "type": "string",
      "description": "tcp, dns, ping, certificate, domain: a hostname."
    },
    "port": {
      "type": "integer",
      "description": "tcp: required. certificate: defaults to 443; on 25, 587 and 2525 the check asks for SMTP's STARTTLS before the handshake.",
      "minimum": 1,
      "maximum": 65535
    },
    "dnsType": {
      "type": "string",
      "description": "dns: A (default), AAAA, CNAME, MX, TXT or NS.",
      "enum": [
        "A",
        "AAAA",
        "CNAME",
        "MX",
        "TXT",
        "NS"
      ]
    },
    "dnsExpect": {
      "type": "string",
      "description": "dns: text an answer must contain, up to 500 characters.",
      "maxLength": 500
    },
    "warnDays": {
      "type": "integer",
      "description": "certificate: default 14. domain: default 30.",
      "minimum": 1,
      "maximum": 365
    },
    "periodMinutes": {
      "type": "integer",
      "description": "heartbeat: required, minutes between pings, 1 to 44640.",
      "minimum": 1,
      "maximum": 44640
    },
    "graceMinutes": {
      "type": "integer",
      "description": "heartbeat: minutes of grace after the period, 0 to 10080. Default 0.",
      "minimum": 0,
      "maximum": 10080
    },
    "groupName": {
      "type": "string",
      "description": "The group it is shown in, up to 60 characters; empty or null for none. Answers call it group.",
      "maxLength": 60
    },
    "group": {
      "type": "string",
      "description": "The same as groupName, under the name answers use. Sent with groupName, the two must agree.",
      "maxLength": 60
    },
    "position": {
      "type": "integer",
      "description": "Its place in the page's order, from 0; past the end is the end, and the others keep their order around it. Left out, a new monitor goes last and a changed one stays.",
      "minimum": 0
    },
    "archived": {
      "type": "boolean",
      "description": "On a change only. true archives it: off the page and its feeds, not checked, not counted against the plan, its history kept, and an automatic incident or alert it left open resolved. false restores it, last on the page, within the plan's monitor count (422 when there is no room)."
    },
    "slowThresholdMs": {
      "type": "integer",
      "description": "http, tcp, dns, ping: 1 to 9999, under the 10 second check timeout.",
      "minimum": 1,
      "maximum": 9999
    },
    "slowThresholds": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "integer",
        "minimum": 1,
        "maximum": 9999
      },
      "description": "http, tcp, dns, ping: some regions' own thresholds, region to ms (1 to 9999), e.g. {\"north-america\": 800}. A reading from one is slow above its number instead of slowThresholdMs. Null: none. Left out on an update, they stay. Hobby and Pro."
    },
    "latencyLocations": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "description": "A region, by name. A location's name stands for its region."
      },
      "description": "http, tcp, dns, ping: the regions whose readings count toward response time and slowness. Null: the page's. Left out on an update, it stays. Hobby and Pro."
    },
    "homePlaces": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "description": "A place or a region, by name."
      },
      "description": "http, tcp, dns, ping, certificate, domain: overrides the page's homePlaces region by region: a place runs that region's checks, a region name leaves it to its fastest place. A region left out, or null, follows the page. Left out on an update, it stays."
    },
    "pinnedRegion": {
      "type": [
        "string",
        "null"
      ],
      "description": "http, tcp, dns, ping, certificate, domain: check from this region alone (europe, north-america, south-america, africa, asia, oceania). Null or empty: every region. Left out on an update, it stays. Hobby and Pro."
    },
    "vendorUrl": {
      "type": "string",
      "description": "component: a vendor's status page to follow (Statuspage, incident.io, Instatus, Better Stack, status.io, Sorry, StatOSS, or Slack's or Heroku's), e.g. https://www.githubstatus.com. Pro."
    },
    "vendorComponent": {
      "type": "string",
      "description": "component: one component on the vendor's page, by name, up to 200 characters. Left out, the whole page is followed.",
      "maxLength": 200
    },
    "method": {
      "type": "string",
      "description": "http: GET (default), HEAD, POST, PUT, PATCH or DELETE.",
      "enum": [
        "GET",
        "HEAD",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ]
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "http: request headers as name to value. A name is letters, digits and hyphens; a value has no line breaks or other control characters. Up to 4000 characters in all. Stored, never returned."
    },
    "body": {
      "type": "string",
      "description": "http: sent as-is with methods that take one, up to 10,000 characters. Stored, never returned.",
      "maxLength": 10000
    },
    "expectStatus": {
      "type": "integer",
      "description": "http: the exact status to pass on, 100 to 599; left out, any 2xx. Redirects (301, 302, 303, 307, 308) are followed up to five hops and the last answer is judged, unless this is 300 to 399: then nothing is followed and the first answer must have this status.",
      "minimum": 100,
      "maximum": 599
    },
    "keyword": {
      "type": "string",
      "description": "http: text the body must contain, or must not (keywordMode). tcp: text the server's greeting must contain within the timeout, such as 220 for SMTP or SSH-2.0; left out, connecting is enough. Up to 200 characters.",
      "maxLength": 200
    },
    "keywordMode": {
      "type": "string",
      "description": "present or absent.",
      "enum": [
        "present",
        "absent"
      ]
    }
  }
}