Skip to content

Uptime API reference

Terminal window
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:

{
"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"
}
Terminal window
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 nameTypeDescription
namestring
urlstring
frequencyintegerNumber of minutes between checks (valid values are 1, 5, or 15).
matchstringThe 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_typestringOne 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_methodstringOne of GET, POST, PUT, PATCH, or DELETE.
request_bodystringThe body content to be sent with the check.
request_headersarrayArray of hashes (e.g., [{ key: "Content-type", value: "application/json" }]) that will be added to the request headers.
locationsarrayArray 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_sslbooleanWhether to have the check fail if the SSL certificate is not valid or is expired.
timeoutintegerBusiness and Enterprise customers only. How long the uptime check will wait for a response before reporting the site as down (in seconds). The default is 30 seconds and the maximum is 120 seconds.
outage_thresholdintegerThe 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.
activebooleanWhether to run the checks.
Terminal window
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.

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

Returns a list of outages with the following format:

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

ParameterDescription
created_afterA Unix timestamp (number of seconds since the epoch)
created_beforeA Unix timestamp (number of seconds since the epoch)
limitNumber of results to return (max and default are 25)

The outage list is always ordered by creation time descending.

Terminal window
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:

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

ParameterDescription
created_afterA Unix timestamp (number of seconds since the epoch)
created_beforeA Unix timestamp (number of seconds since the epoch)
limitNumber of results to return (max and default are 25)

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