Projects
Get a project list or project details
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects?account_id=ACCOUNT_ID
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID
Returns a list or a single project with the following format:
{
"active": true,
"created_at": "2012-06-09T20:33:27.798800Z",
"earliest_notice_at": "2015-12-18T19:30:32.470689Z",
"environments": ["development", "production"],
"fault_count": 14,
"id": 1,
"last_notice_at": "2016-06-14T18:31:54.000000Z",
"name": "Rails exception tracking gem",
"owner": {
"email": "westley@honeybadger.io",
"id": 1,
"name": "Westley"
},
"sites": [
{
"active": true,
"id": "9eed6a7e-af77-4cc6-8c55-7a5afa59a90b",
"last_checked_at": "2016-06-15T12:57:29.646956Z",
"name": "Main site",
"state": "up",
"url": "http://www.example.com"
}
],
"teams": [
{
"id": 1,
"name": "Team Marie"
}
],
"token": "098sflj2",
"unresolved_fault_count": 1,
"users": [
{
"email": "inigo@honeybadger.io",
"id": 2,
"name": "Inigo Montoya"
},
{
"email": "westley@honeybadger.io",
"id": 1,
"name": "Westley"
}
]
}
If the account_id
parameter is not supplied when requesting the list of projects, all projects will be returned across all accounts to which the provided AUTH_TOKEN has access.
Create a project
curl -u AUTH_TOKEN: \
-X POST \
-H 'Content-type: application/json' \
-d '{"project":{"name":"My project"}}' \
https://app.honeybadger.io/v2/projects?account_id=ACCOUNT_ID
Here is a list of the fields that can be provided:
Field name | Type | Description |
---|---|---|
name | string | |
resolve_errors_on_deploy | boolean | Whether all unresolved faults should be marked as resolved when a deploy is recorded |
disable_public_links | boolean | Whether to allow fault details to be publicly shareable via a button on the fault detail page |
language | string | One of "js", "elixir", "golang", "java", "node", "php", "python", "ruby", or "other" |
user_url | string | A URL format like "http://example.com/admin/users/[user_id]" that will be displayed on the fault detail page and have [user_id] replaced with the user_id from the fault's context hash. |
source_url | string | A URL format like "https://gitlab.com/username/reponame/blob/[sha]/[file]#L[line]" that is used to link lines in the backtrace to your git browser. This can be left blank if you provide the repository info in your deploy payloads or if you use the GitHub integration for your project. |
purge_days | integer | The number of days to retain data (up the to max number of days available to your subscription plan). |
user_search_field | string | A field such as "context.user_email" that you provide in your error context. This field will be used to create the aggregated list of affected users. |
If the account_id
query parameter is not provided, the project will be associated with the first account accessible by the user associated with the AUTH_TOKEN.
Update a project
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"project":{"name":"Updated project name"}}' https://app.honeybadger.io/v2/projects/ID
The fields listed in the prior section are also available when updating a project.
Delete a project
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/projects/ID
Get a count of occurrences for all projects or a single project
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/occurrences
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/occurrences
Provides the number of times errors have been encountered in your project or across all your projects.
[
[ 1510963200, 1440 ],
[ 1511049600, 1441 ],
[ 1511136000, 1441 ],
[ 1511222400, 1441 ],
...
]
The data is returned as an array of epoch seconds/count pairs, and it can be filtered with these URL parameters:
Parameter | Description |
---|---|
period | One of "hour", "day", "week", or "month". Defaults to "hour" |
environment | Limit results to this environment |
When the period is "hour" (the default), the data returned is the most recent 60 one-minute buckets. When it is "day", the data comes from the most recent 24 one-hour buckets, and when it is "week" or "month", the data is grouped into one-day buckets. All times and bucket boundaries are UTC.
Get a list of integrations for a project
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/integrations
Returns a list of integrations (a.k.a. channels) for a project:
[
{
"id": 9693,
"active": false,
"events": ["occurred", "assigned"],
"site_ids": ["605e7c8e-e6c8-4102-a8f8-37a9431ee78be"],
"options": {
"url": "http://requestb.in/7d87eae"
},
"excluded_environments": [],
"filters": [],
"type": "WebHook"
}
]
The options
element varies depending on the type of integration.
Get report data
The following endpoints provide the data that is displayed on the Reports tab for a project.
These URL parameters can be used to filter the data returned by each of the report endpoints:
Parameter | Description |
---|---|
start | Date/time in ISO 8601 format for the beginning of the reporting period |
stop | Date/time in ISO 8601 format for the end of the reporting period |
environment | Limit results to this environment |
Notices by class
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/reports/notices_by_class
Returns a count of error notifications processed, grouped by class.
[
[
"RuntimeError",
8347
],
[
"SocketError",
4651
]
]
Notices by location
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/reports/notices_by_location
Returns a count of error notifications processed, grouped by location. The location is framework-dependent; e.g., for Rails applications it's a combination of the controller and the action.
[
[
"inquiries#create",
2904
],
[
"members#details",
862
]
]
Notices by user
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/reports/notices_by_user
Returns a count of error notifications processed, grouped by user (assuming you are providing user_id and/or user_email in the context).
[
[
"julia@example.com",
579
],
[
"marie@example.com",
289
]
]
Notices by day
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/projects/ID/reports/notices_per_day
Returns a count of error notifications processed, grouped by day (with days starting at midnight UTC).
[
[
"2023-01-24T00:00:00.000000+00:00",
3161
],
[
"2023-01-25T00:00:00.000000+00:00",
2620
],
[
"2023-01-26T00:00:00.000000+00:00",
2852
],
[
"2023-01-27T00:00:00.000000+00:00",
2502
],
[
"2023-01-28T00:00:00.000000+00:00",
1759
],
[
"2023-01-29T00:00:00.000000+00:00",
1420
],
[
"2023-01-30T00:00:00.000000+00:00",
3027
],
[
"2023-01-31T00:00:00.000000+00:00",
1624
]
]