Uptime

Get a site list or site details

bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/sites curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/sites/ID

Returns a list of sites or a single sites for the given project with the following format:

json
{ "active": true, "frequency": 5, "id": "9eed6a7e-af77-4cc6-8c55-b7b17555330d", "last_checked_at": "2016-06-15T12:57:29.646956Z", "match": null, "match_type": "success", "name": "Main site", "state": "down", "url": "http://www.example.com" }

Create a site

bash
curl -u AUTH_TOKEN: -X POST -H 'Content-type: application/json' -d '{"site":{"name":"My site","url":"https://www.example.com/"}}' https://app.honeybadger.io/v2/projects/ID/sites

Here is a list of the fields that can be specified:

Field name Type Description
name string
url string
frequency integer Number of minutes between checks (valid values are 1, 5, or 15).
match string The status code that will be returned or string to be present/absent to indicate a passing check, depending on the value of match_type. Unused when the match_type is "success".
match_type string One of "success" for a status code of 200-299, "exact" for a particular status code (provided via the match field), "include" to require the text in match to be present on the page, and "exclude" to require the text in match to not be present on the page.
request_method string One of GET, POST, PUT, PATCH, or DELETE.
request_body string The body content to be sent with the check.
request_headers array Array of hashes (e.g., [{ key: "Content-type", value: "application/json" }]) that will be added to the request headers.
locations array Array of strings (e.g, ['London', 'Virginia']) that will limit the locations that will be used for the checks. Providing an empty array (the default) will cause all locations to be used. Available locations are Virginia, Oregon, Frankfurt, Singapore, and London.
validate_ssl boolean Whether to have the check fail if the SSL certificate is not valid or is expired.
outage_threshold integer The number of unsuccessful checks required to trigger an alert. If this is blank, then an alert will be sent after half of the locations return with failed checks.
active boolean Whether to run the checks.

Update a site

bash
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"site":{"name":"Updated site name"}}' https://app.honeybadger.io/v2/projects/ID/sites/ID

Update requests can change the same fields as create requests.

Delete a site

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

Get a list of outages for a site

bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/sites/ID/outages

Returns a list of outages with the following format:

json
{ "down_at": "2015-02-17T18:20:44.776959Z", "up_at": "2015-02-17T18:22:35.614678Z", "created_at": "2015-02-17T18:20:44.777914Z", "status": 301, "reason": "Expected 2xx status code. Got 301", "headers": { "Date": "Tue, 17 Feb 2015 18:20:44 GMT", "Server": "DNSME HTTP Redirection", "Location": "http://text.vote/polls", "Connection": "close", "Content-Length": "0" } }

The outage list can be filtered with these URL parameters:

Parameter Description
created_after A Unix timestamp (number of seconds since the epoch)
created_before A Unix timestamp (number of seconds since the epoch)
limit Number of results to return (max and default are 25)

The outage list is always ordered by creation time descending.

Get a list of uptime checks for a site

bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/sites/ID/uptime_checks

Returns a list of uptime checks with the following format:

json
{ "created_at": "2016-06-16T20:19:32.852569Z", "duration": 1201, "location": "Singapore", "up": true }

The uptime check list can be filtered with these URL parameters:

Parameter Description
created_after A Unix timestamp (number of seconds since the epoch)
created_before A Unix timestamp (number of seconds since the epoch)
limit Number of results to return (max and default are 25)

The uptime check list is always ordered by creation time descending.