Faults

Get a fault's occurrence counts

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.

get/projects/{project_id}/faults/{fault_id}/occurrences

Request

Path parameters

project_idstring required
Example:Xk9mZp

Project ID

fault_idstring required
Example:12345

Fault ID

Query parameters

occurred_afternumber double

Only occurrences after this Unix timestamp (seconds, not ISO 8601). A value before the project's retention window is moved up to it. On the fault list, occurrence counts cover this window.

occurred_beforenumber double

Only occurrences before this Unix timestamp (seconds, not ISO 8601).

qstring

Search query, in the syntax of the web UI's error search, such as environment:production, is:resolved or class:ArgumentError. Prefix a filter with - to negate it. See Error search for the syntax and filters. Filters that need the search index return nothing when it holds no data for the project.

Response

Success

Example response

{
  "data": [
    {
      "timestamp": 1704067200,
      "count": 12
    }
  ],
  "meta": {
    "request_id": "6f1c2b0e-8d4a-4f6e-9b2a-3c5d7e9f1a2b",
    "window": {
      "occurred_after": 1704067200,
      "occurred_before": 1704070800
    },
    "interval_seconds": 60
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.