curl --request GET \
--url https://api.checklyhq.com/v1/checks/heartbeats/{checkId}/events \
--header 'Authorization: Bearer <token>'[
{
"events": [
{
"id": "<string>",
"state": "FAILING",
"timestamp": "2023-07-24T10:01:01.098Z",
"source": "HTTPS GET from Curl",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
}
],
"stats": {
"last24Hours": {
"successRatio": {
"previousPeriod": 123,
"currentPeriod": 123
},
"totalEntitiesCurrentPeriod": 123
},
"last7Days": {
"successRatio": {
"previousPeriod": 123,
"currentPeriod": 123
},
"totalEntitiesCurrentPeriod": 123
}
}
}
]Get all events from a heartbeat.
curl --request GET \
--url https://api.checklyhq.com/v1/checks/heartbeats/{checkId}/events \
--header 'Authorization: Bearer <token>'[
{
"events": [
{
"id": "<string>",
"state": "FAILING",
"timestamp": "2023-07-24T10:01:01.098Z",
"source": "HTTPS GET from Curl",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
}
],
"stats": {
"last24Hours": {
"successRatio": {
"previousPeriod": 123,
"currentPeriod": 123
},
"totalEntitiesCurrentPeriod": 123
},
"last7Days": {
"successRatio": {
"previousPeriod": 123,
"currentPeriod": 123
},
"totalEntitiesCurrentPeriod": 123
}
}
}
]The Checkly Public API uses API keys to authenticate requests. You can get the API Key here. Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL: curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"
Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general
x <= 10Successful
Show child attributes
Describe the event state, if the ping was received or not.
FAILING, EARLY, RECEIVED, GRACE, LATE "FAILING"
UTC timestamp on which we received the event.
"2023-07-24T10:01:01.098Z"
Source which triggered the event.
"HTTPS GET from Curl"
User agent from the ping.
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36"
Show child attributes
Was this page helpful?