Insights

Run an Insights query

Runs a BadgerQL query against the project's event streams and returns the result. It's a POST, but it changes nothing.

Pass stream_ids to choose streams, or leave it out to search them all. Events on a stream that isn't selected return no rows. See BadgerQL for the query language.

post/projects/{project_id}/insights/queries

Request

Path parameters

project_idstring required
Example:Xk9mZp

Project ID

Request body

querystring required

BadgerQL query

stream_idsstring[]

Streams to search. Omit it, or pass an empty array, to search every stream on the project. Every ID must belong to this project; repeated IDs are deduplicated.

tsstring

Time range for the query

timezonestring

Timezone for time bucketing and display

Example request

{
  "query": "@size > 0 | limit 10",
  "ts": "1h",
  "timezone": "UTC"
}

Response

The query result. Its fields depend on the query: an aggregation returns different fields from an event listing.

links.web opens this query in the Honeybadger web UI, with the request's ts, stream_ids and timezone (UTC when none was sent). Present even when data carries an error from a query that failed while running.

dataobject required

The query result; its fields depend on the query.

Example response

{
  "links": {
    "web": "https://app.honeybadger.io/projects/Xk9mZp"
  },
  "meta": {
    "request_id": "6f1c2b0e-8d4a-4f6e-9b2a-3c5d7e9f1a2b"
  }
}

Changes

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