Monitors
get/uptime/monitors
Request
- Base URLhttps://api.phare.io
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
tagstring
Filter monitors by tag. Can be specified multiple times to only return monitors having all the given tags.
pageinteger
Example:1
Page number to show
per_pageinteger
Example:20
Number of resources to return per page
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.
Response
Success, monitors retrieved
Example response
{
"data": [
{
"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"
]
}
],
"meta": {
"current_page": 2,
"from": 11,
"to": 20,
"per_page": 100,
"path": "https://api.phare.io/{resource}?page=2"
},
"links": {
"first": "https://api.phare.io/{resource}?page=2",
"last": "https://api.phare.io/{resource}?page=10",
"prev": "https://api.phare.io/{resource}?page=1",
"next": "https://api.phare.io/{resource}?page=1"
}
}Changes
- info
the endpoint scheme security
BearerAuthwas added to the API
- info
- info
added the optional property
//to the response with the status
- info