Check-in Resource
Get a check-in list or check-in details
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/check_ins
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/check_ins/ID
Returns a list of check-ins or a single check-in for a project. There are two different types of check-ins, simple or cron, and the response varies a bit between the two types.
Simple check-in
{
"state": "pending",
"schedule_type": "simple",
"reported_at": null,
"expected_at": null,
"missed_count": 0,
"grace_period": "5 minutes",
"id": "XXXXXX",
"name": "Hourly clean up",
"slug": "hourly-clean-up",
"url": "https://api.honeybadger.io/v1/check_in/XXXXXX",
"report_period": "1 hour"
}
Cron check-in
{
"state": "reporting",
"schedule_type": "cron",
"reported_at": "2018-01-16T12:36:11Z",
"expected_at": "2018-01-17T12:36:11Z",
"missed_count": 0,
"grace_period": "",
"id": "YYYYYY",
"name": "Hourly check",
"slug": "hourly-check",
"url": "https://api.honeybadger.io/v1/check_in/YYYYYY",
"cron_schedule": "30 * * * *",
"cron_timezone": "UTC"
}
Create a check-in
curl -u AUTH_TOKEN: -X POST -H 'Content-type: application/json' -d '{"check_in":{"name":"Daily reports", "report_period":"1 day", "schedule_type":"simple"}}' https://app.honeybadger.io/v2/projects/ID/check_ins
This endpoint returns either the simple or cron check-in response described above, depending on the type of check-in you create.
These fields can be provided:
Field name | Type | Description |
---|---|---|
name | string | |
slug | string | Optional identifier for more human-friendly check-in URL. |
schedule_type | string | Valid values are "simple" or "cron". If you specify "cron", then the "cron_schedule" field is required. |
report_period | string | For simple check-ins, the amount of time that can elapse before the check-in is reported as missing. E.g., "1 day" would require a hit to the API daily to maintain the "reporting" status. Valid time periods are "minute", "hour", "day", "week", and "month": "5 minutes", "7 days", etc. |
grace_period | string | The amount of time to allow a job to not report before it's reported as missing. Valid values are the same as the report_period field. |
cron_schedule | string | For a schedule_type of "cron", the cron-compatible string that defines when the job should be expected to hit the API. |
cron_timezone | string | The timezone setting for your server that is running the cron job to be monitored. The default value is "UTC". Valid timezone values are listed here. |
Update a check-in
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"check_in":{"name":"Updated check-in name"}}' https://app.honeybadger.io/v2/projects/ID/check_ins/ID
The fields listed in the previous section other than schedule_type
can
be updated. In other words, the schedule type can't be changed. The
report_period
field is only valid for simple check-ins, and the
cron_schedule
and cron_timezone
fields are only valid for cron
check-ins.
Update all check-ins
Use this endpoint with caution, as it will delete all existing check-ins if you send an empty payload.
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"check_ins":[{"name":"Updated check-in name", "slug":"my-slug"}]}' https://app.honeybadger.io/v2/projects/ID/check_ins
Similar to updating a single check-in, this endpoint can be used to update multiple check-ins at once. All check-ins need to be unique by slug and by name (if provided). Any check-ins that do not have a matching slug or name will be created, and any check-ins that are not present in the request will be deleted.
The results will be an array of the updated check-ins and any check-ins that were created or deleted. The response will look like this:
{
"results": [
{
"operation": "update",
"slug": "my-changed-slug",
"success": true
},
{
"operation": "create",
"slug": "my-changed-slug",
"success": false,
"errors": [
"Slug is not unique"
]
},
{
"operation": "delete",
"slug": "my-deleted-slug",
"success": true
}
]
}
Delete a check-in
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/projects/ID/check_ins/ID