Monitoring
Update a monitor
Pause or resume a monitor.
PATCH
/
v1
/
api
/
monitors
/
{id}
Pause or resume a monitor
curl --request PATCH \
--url https://api.pagepith.com/v1/api/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.pagepith.com/v1/api/monitors/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagepith.com/v1/api/monitors/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"monitor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"status": "active",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"lastChangedAt": "2023-11-07T05:31:56Z",
"consecutiveFailures": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "email",
"destination": "<string>",
"enabled": true
}
]
}
}Was this page helpful?
⌘I
Pause or resume a monitor
curl --request PATCH \
--url https://api.pagepith.com/v1/api/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.pagepith.com/v1/api/monitors/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagepith.com/v1/api/monitors/{id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"monitor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"status": "active",
"lastCheckedAt": "2023-11-07T05:31:56Z",
"lastChangedAt": "2023-11-07T05:31:56Z",
"consecutiveFailures": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"channels": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "email",
"destination": "<string>",
"enabled": true
}
]
}
}