Cronly
Search…
Webhooks
Webhooks allow you to actively respond to events, from within your own environment.

How webhooks are used

Webhooks are part of triggers. You can setup a webhook endpoint URL for each Trigger you've created. Just go to the trigger, edit the trigger and set a webhook endpoint URL. For every event that occurs, that fires that trigger, the webhook endpoint URL is called.
Cronly sends a HTTP request with POST data, and JSON contents.

Request to your webhook

You can match the private key, within your own webhook. The private key can be found inside your Trigger details.
Tools » Triggers » Edit
Each event can have one of the following statuses.
    notification This is for certificates only, to inform you of nearly expiring certificates.
    alert There is a problem, with either your cron job or certificate.
    cleared The problem was cleared.
Each event can have one of the following types.
    cron This event is for a cron job.
    certificate This event is for a certificate.
The object can be either a cron job or certificate.

Request body example for a cron job

1
{
2
"private_key": "",
3
"event": {
4
"id": 123,
5
"type": "cron",
6
"typeID": "1",
7
"status": "cleared",
8
"title": "Lorem ipsum",
9
"description": "Dolar set amet.",
10
"longDescription": "Dolar set amet conseqtuer.",
11
"added": "2020-08-19 10:08:26",
12
"timezone": "Europe/Amsterdam"
13
},
14
"object": {
15
"id": 123,
16
"added": "2018-01-01 00:00:00",
17
"project": "Default",
18
"name": "Lorem ipsum",
19
"schedule": "* * * * *",
20
"previousRun": "2018-01-01 01:04:00",
21
"nextRun": "2018-01-01 01:05:00",
22
"lastCheck": "2018-01-01 01:04:25",
23
"lastPulse": "2018-01-01 01:04:15",
24
"timezone": "Europe/Amsterdam",
25
"status": "healthy",
26
"archive": 0
27
}
28
}
Copied!

Request body example for a SSL certificate

1
{
2
"private_key": "",
3
"event": {
4
"id": 123,
5
"type": "cron",
6
"typeID": "1",
7
"status": "cleared",
8
"title": "Lorem ipsum",
9
"description": "Dolar set amet.",
10
"longDescription": "Dolar set amet conseqtuer.",
11
"added": "2020-08-19 10:08:26",
12
"timezone": "Europe/Amsterdam"
13
},
14
"object": {
15
"id": 123,
16
"added": "2018-01-01 00:00:00",
17
"project": "Default",
18
"hostName": "domain.com",
19
"port": 443,
20
"lastCheck": "2018-01-01 01:04:25",
21
"status": "healthy",
22
"archive": 0
23
}
24
}
Copied!

Expected response

Successful response

We wait for a response from your webhook and fetch and store the response for you to review. The response should have a 200 OK HTTP response, if everything works as expected. We store your response as plain text, with all HTML removed, and a character limit of 1000.

Error response

Any other response code will be interpreted as an error. Cronly sends out an e-mail notification to all e-mail addresses related to the trigger.

Testing a webhook request

1
curl --header "Content-Type: application/json" \
2
--request POST \
3
--data '{ JSON body }' \
4
https://yourwebhook.com/endpoint
Copied!
Last modified 9mo ago