Update a monitor
Changed onUpdate a monitor by ID
Request
- Base URLhttps://api.phare.io
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID of the monitor to update
Headers
A project header is required when using an organization-scoped API key.
A project header is required when using an organization-scoped API key.
Request body
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
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
- info
- 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 from0to2 - breaking
the
//request property's minLength was increased from0to1 - breaking
the
///request property's minLength was increased from0to3 - breaking
the
///request property's minLength was increased from0to1 - breaking
the
///request property's minLength was increased from0to1 - breaking
added
subschema #3: ICMP protocolto theresponse propertyoneOflist for the response status - warning
the
request property's maxLength was set to45 - warning
the
//request property's maxLength was set to500 - warning
the
////request property's maxLength was set to50 - warning
the
////request property's maxLength was set to1024 - warning
the
//request property's maxLength was set to255 - warning
the
//request property's maxLength was set to50 - warning
the
///request property's maxLength was set to150 - warning
the
///request property's maxLength was set to100 - warning
the
///request property's maxLength was set to150 - warning
the
///request property's maxLength was set to150 - warning
added the new
icmpenum value to theresponse property for the response status - info
added the new optional request property
- info
added the new
icmpenum value to the request property - info
added
subschema #3: ICMP protocolto therequest propertyoneOflist - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking