---
title: "Get a fault's occurrence counts"
method: GET
path: "/projects/{project_id}/faults/{fault_id}/occurrences"
tags: ["Faults"]
---

# Get a fault's occurrence counts

`GET /projects/{project_id}/faults/{fault_id}/occurrences`

## Request

- Base URL: `https://app.honeybadger.io/v3`
- URL: `https://app.honeybadger.io/v3/projects/{project_id}/faults/{fault_id}/occurrences`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/honeybadger/apis/honeybadger-api/docs/projects/:project_id/faults/:fault_id/occurrences/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a fault's occurrence counts over a window, set with `occurred_after` and `occurred_before`. With neither, the window is the last hour; with only `occurred_before`, the hour before it; with only `occurred_after`, from then until now. A start older than the project's retention is moved up to it.

The bucket size depends on the window's length. `meta.window` gives the window served and `meta.interval_seconds` the bucket size. Every interval is included, with 0 where there were no occurrences.

## Path parameters

- `project_id` string, required
- `fault_id` string, required

## Query parameters

- `occurred_after` number, double
- `occurred_before` number, double
- `q` string

## Response `200`

Success

- object
  - `data` object[], required: Buckets in ascending time order, one per interval across the served window.
    - `timestamp` integer, required: Start of the bucket, as a Unix timestamp.
    - `count` integer, required: Occurrences within the bucket.
  - `meta` object
    - `request_id` string: Unique identifier for the request, for correlating with support
    - `window` object: The window actually served.
      - `occurred_after` number, double, required: Unix timestamp, preserving fractional seconds.
      - `occurred_before` number, double, required: Unix timestamp, preserving fractional seconds.
    - `interval_seconds` integer, nullable: Spacing between bucket timestamps. Null when the requested window falls entirely outside retention.
    - `retention_truncated` boolean: Whether retention narrowed the requested window.

## Other responses

- `301`: This fault was merged into another fault. Location is the same resource on the fault it was merged into: `…/faults/<survivor>` for the fault, or the same subresource path and query for occurrences, affected users and notices. Only reads redirect; writes get a 409 `fault_merged`.
- `400`: A query parameter is malformed or outside its allowed values. `error.details` names the parameter.
- `401`: The credential is missing, invalid, expired or revoked (`unauthorized`), or was sent in a way v3 doesn't accept (see the examples).
- `403`: The credential isn't allowed to do this. `error.code` says why. An account or project the credential doesn't cover is 404 `not_found`, not 403.
- `404`: Resource not found
- `422`: No path names the account, so the API token has to. This is returned when the token covers more than one account and the account a request applies to cannot be determined. Use a token bound to a single account.
- `503`: Temporarily unavailable. Retry shortly.

---

[API](https://skmtc.dev/honeybadger/apis/honeybadger-api.md) - [All operations](https://skmtc.dev/honeybadger/apis/honeybadger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/honeybadger/apis/honeybadger-api/revisions/cbcff53f2c8a?raw)
