Create a heartbeat (cron) monitor.
POST
/cron/job
const url = 'https://api.siteqwality.com/cron/job';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"friendly_name":"example","check_interval_seconds":1,"grace_seconds":1,"group_notification_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"tags":["example"],"service_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/cron/job \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "friendly_name": "example", "check_interval_seconds": 1, "grace_seconds": 1, "group_notification_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tags": [ "example" ], "service_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
friendly_name
string | null
check_interval_seconds
required
integer format: int32
grace_seconds
Extra seconds, 0 to 86400, after the interval before a missing ping alerts. Default 0.
integer | null format: int32
group_notification_ids
Notification groups to alert. Left out or null: the account’s default group. []: notify no one.
array | null
tags
array | null
service_id
The service this monitor belongs to.
string | null format: uuid
Example generated
{ "friendly_name": "example", "check_interval_seconds": 1, "grace_seconds": 1, "group_notification_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tags": [ "example" ], "service_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”Heartbeat monitor created
Invalid request body
Missing or invalid authentication
Monitor limit reached for the account’s plan
Internal server error