Check-in Resource

Get a check-in list or check-in details

bash
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

json
{ "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

json
{ "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

bash
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

bash
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.

Delete a check-in

bash
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/projects/ID/check_ins/ID