POST
/
uptime
/
monitors
/
{monitorId}
curl --request POST \
  --url https://api.phare.io/uptime/monitors/{monitorId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Website",
  "protocol": "http",
  "request": {
    "method": "HEAD",
    "url": "https://docs.phare.io/introduction",
    "tls_skip_verify": false,
    "follow_redirects": true,
    "keyword": "pong",
    "user_agent_secret": "definitely-not-a-bot",
    "headers": [
      {
        "name": "X-Phare-Says",
        "value": "Hello world!"
      }
    ]
  },
  "interval": 60,
  "timeout": 7000,
  "incident_confirmations": 1,
  "recovery_confirmations": 1,
  "regions": [
    "as-jpn-hnd"
  ]
}'
{
  "id": 1,
  "project_id": 1,
  "status": "fetching",
  "paused": true,
  "response_time": 123,
  "one_day_availability": 99.9999,
  "seven_days_availability": 99.9999,
  "name": "Website",
  "protocol": "http",
  "request": {
    "method": "HEAD",
    "url": "https://docs.phare.io/introduction",
    "tls_skip_verify": false,
    "follow_redirects": true,
    "keyword": "pong",
    "user_agent_secret": "definitely-not-a-bot",
    "headers": [
      {
        "name": "X-Phare-Says",
        "value": "Hello world!"
      }
    ]
  },
  "interval": 60,
  "timeout": 7000,
  "incident_confirmations": 1,
  "recovery_confirmations": 1,
  "regions": [
    "as-jpn-hnd"
  ],
  "last_checked_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
Please be aware that the Phare API is currently in beta and is subject to change.

Authorizations

Authorization
string
header
required

Use a user token to access authenticated routes. The token must be specified in the Authorization HTTP header with the following format 'Authorization: Bearer <token>'.

Path Parameters

monitorId
integer
required

ID of the monitor to update

Body

application/json

Monitor request

The body is of type object.

Response

200
application/json

Success, monitor updated

The response is of type object.