Monitors

Update a monitor

Changed on

Update a monitor by ID

post/uptime/monitors/{monitorId}

Request

Path parameters

monitorIdinteger required

ID of the monitor to update

Headers

X-Phare-Project-Idinteger
Example:1

A project header is required when using an organization-scoped API key.

X-Phare-Project-Slugstring
Example:luminous-guiding-tower

A project header is required when using an organization-scoped API key.

Request body

namestring

Monitor name

display_namestring nullable

Public name of the monitor on status pages, defaults to the monitor name

protocol'http' | 'tcp' | 'icmp'
interval30 | 60 | 120 | 180 | 300 | 600 | 900 | 1800 | 3600

Monitoring interval in seconds

timeout1000 | 2000 | 3000 | 4000 | 5000 | 6000 | 7000 | 8000 | 9000 | 10000 | 15000 | 20000 | 25000 | 30000

Monitoring timeout in milliseconds

incident_confirmations1 | 2 | 3 | 4 | 5

Number of uninterrupted failed checks required to create an incident

recovery_confirmations1 | 2 | 3 | 4 | 5

Number of uninterrupted successful checks required to resolve an incident

region_thresholdinteger

Number of regions that must fail before an incident is confirmed, cannot exceed the number of selected regions

regionsUptimeMonitorRegionEnum[]

List of regions where monitoring checks are performed

tagsstring[] nullable

Resource tags, made of lowercase letters, numbers, ., _, : and -. An organization can have up to 200 tags.

Example request

{
  "name": "Website",
  "display_name": "Website",
  "request": {
    "url": "https://docs.phare.io/introduction",
    "body": "Hello, World!",
    "follow_redirects": true,
    "user_agent_secret": "definitely-not-a-bot",
    "headers": [
      {
        "name": "X-Phare-Says",
        "value": "Hello world!"
      }
    ]
  },
  "interval": 60,
  "timeout": 20000,
  "success_assertions": [
    {
      "operator": "in",
      "value": "2xx,30x,418"
    }
  ],
  "incident_confirmations": 1,
  "recovery_confirmations": 1,
  "region_threshold": 1,
  "tags": [
    "environment:production"
  ]
}

Response

Success, monitor updated

idinteger

Monitor ID

project_idinteger

Parent project ID

status'fetching' | 'online' | 'offline' | 'partial' | 'paused'
pausedboolean

Whether the monitor is currently paused

response_timeinteger nullable

75th percentile (P75) response time of successful checks over the last 7 days, in milliseconds

namestring required

Monitor name

display_namestring nullable

Public name of the monitor on status pages, defaults to the monitor name

protocol'http' | 'tcp' | 'icmp' required
interval30 | 60 | 120 | 180 | 300 | 600 | 900 | 1800 | 3600

Monitoring interval in seconds

timeout1000 | 2000 | 3000 | 4000 | 5000 | 6000 | 7000 | 8000 | 9000 | 10000 | 15000 | 20000 | 25000 | 30000

Monitoring timeout in milliseconds

incident_confirmations1 | 2 | 3 | 4 | 5

Number of uninterrupted failed checks required to create an incident

recovery_confirmations1 | 2 | 3 | 4 | 5

Number of uninterrupted successful checks required to resolve an incident

region_thresholdinteger

Number of regions that must fail before an incident is confirmed, cannot exceed the number of selected regions

regionsUptimeMonitorRegionEnum[] required

List of regions where monitoring checks are performed

tagsstring[] nullable

Resource tags, made of lowercase letters, numbers, ., _, : and -. An organization can have up to 200 tags.

last_checked_atstring date-time nullable

Date of the last performed check with a 30s accuracy

created_atstring date-time

Date of creation for the entity

updated_atstring date-time

Date of last update for the entity

Example response

{
  "id": 1,
  "project_id": 1,
  "paused": true,
  "response_time": 123,
  "name": "Website",
  "display_name": "Website",
  "request": {
    "url": "https://docs.phare.io/introduction",
    "body": "Hello, World!",
    "follow_redirects": true,
    "user_agent_secret": "definitely-not-a-bot",
    "headers": [
      {
        "name": "X-Phare-Says",
        "value": "Hello world!"
      }
    ]
  },
  "interval": 60,
  "timeout": 20000,
  "success_assertions": [
    {
      "operator": "in",
      "value": "2xx,30x,418"
    }
  ],
  "incident_confirmations": 1,
  "recovery_confirmations": 1,
  "region_threshold": 1,
  "tags": [
    "environment:production"
  ]
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property // became not nullable

    • breaking

      the request property's minLength was increased from 0 to 2

    • breaking

      the // request property's minLength was increased from 0 to 1

    • breaking

      the /// request property's minLength was increased from 0 to 3

    • breaking

      the /// request property's minLength was increased from 0 to 1

    • breaking

      the /// request property's minLength was increased from 0 to 1

    • breaking

      added subschema #3: ICMP protocol to the response property oneOf list for the response status

    • warning

      the request property's maxLength was set to 45

    • warning

      the // request property's maxLength was set to 500

    • warning

      the //// request property's maxLength was set to 50

    • warning

      the //// request property's maxLength was set to 1024

    • warning

      the // request property's maxLength was set to 255

    • warning

      the // request property's maxLength was set to 50

    • warning

      the /// request property's maxLength was set to 150

    • warning

      the /// request property's maxLength was set to 100

    • warning

      the /// request property's maxLength was set to 150

    • warning

      the /// request property's maxLength was set to 150

    • warning

      added the new icmp enum value to the response property for the response status

    • info

      added the new optional request property

    • info

      added the new icmp enum value to the request property

    • info

      added subschema #3: ICMP protocol to the request property oneOf list

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status