---
title: "Get Query Result"
method: GET
path: "/1/query_results/{datasetSlug}/{queryResultId}"
tags: ["Query Data"]
---

# Get Query Result

`GET /1/query_results/{datasetSlug}/{queryResultId}`

Get the Query Result details for a specific Query Result ID.
This endpoint is used to fetch the results of a query that had previously been created. It is recommended to follow the Location header included in the Create Query Result output, but the URL can also be constructed manually with the &lt;query-result-id&gt;.

## Response `200`

Success

- QueryResultDetails — Query Results for the Query ID. The response body will be a JSON object with "complete": true and the results populated once the query is complete. The response body will contain caching headers to indicate that once complete, and the Query Result may be cached, as it will not change.
  - `query` Query
    - `id` string
    - `breakdowns` string[] — the columns by which to break events down into groups
    - `calculations` object[] — the calculations to return as a time series and summary table
      - `op` 'COUNT' | 'CONCURRENCY' | 'SUM' | 'AVG' | 'COUNT_DISTINCT' | 'HEATMAP' | 'MAX' | 'MIN' | 'P001' | 'P01' | 'P05' | 'P10' | 'P20' | 'P25' | 'P50' | 'P75' | 'P80' | 'P90' | 'P95' | 'P99' | 'P999' | 'RATE_AVG' | 'RATE_SUM' | 'RATE_MAX', required
      - `column` string, nullable — The name of the column
      - `name` string, nullable — The name of the calculation. This is required if using calculation filters. Only available in Metrics Beta.
      - `filters` object[] — The filters with which to restrict the results of this particular calculation. Does not support relational fields. Only available in Metrics Beta.
        - `op` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'starts-with' | 'does-not-start-with' | 'ends-with' | 'does-not-end-with' | 'exists' | 'does-not-exist' | 'contains' | 'does-not-contain' | 'in' | 'not-in', required
        - `column` string, nullable, required
        - `value` union
          - integer
          - number
          - string
          - boolean
      - `filter_combination` 'AND' | 'OR' — Set to "OR" to match ANY filter in the filter list
    - `filters` object[] — The filters with which to restrict the considered events
      - `op` '=' | '!=' | '>' | '>=' | '<' | '<=' | 'starts-with' | 'does-not-start-with' | 'ends-with' | 'does-not-end-with' | 'exists' | 'does-not-exist' | 'contains' | 'does-not-contain' | 'in' | 'not-in', required
      - `column` string, nullable, required
      - `value` union
        - integer
        - number
        - string
        - boolean
    - `filter_combination` 'AND' | 'OR' — Set to "OR" to match ANY filter in the filter list
    - `formulas` object[] — Mathematical formulas to be returned as a time series and summary table. Formulas operate on the results of calculations and are returned in query results instead of calculations. Only available in Metrics Beta.
      - `name` string, required — The name of the formula
      - `expression` string, required — An expression that follows the same syntax as calculated field expressions, but uses the names of items in the calculations list in place of column names.
    - `granularity` integer — The time resolution of the query's graph, in seconds. Given a query time range T, valid values (T/1000...T/1). If left blank, granularity may be set to a sub-second value for queries with short time ranges.
    - `orders` object[] — The terms on which to order the query results. Each term must appear in the `breakdowns` field, the `calculations` field, or the `formulas` field. Formulas and calculations with name properties can be referenced by putting the name in the column property.
      - `column` string
      - `op` 'COUNT' | 'CONCURRENCY' | 'SUM' | 'AVG' | 'COUNT_DISTINCT' | 'HEATMAP' | 'MAX' | 'MIN' | 'P001' | 'P01' | 'P05' | 'P10' | 'P20' | 'P25' | 'P50' | 'P75' | 'P80' | 'P90' | 'P95' | 'P99' | 'P999' | 'RATE_AVG' | 'RATE_SUM' | 'RATE_MAX'
      - `order` 'ascending' | 'descending'
    - `limit` integer — The maximum number of unique groups returned in 'results'. Aggregating many unique groups across a large time range is computationally expensive, and too high a limit with too many unique groups may cause queries to fail completely. Limiting the results to only the needed values can significantly speed up queries. The normal allowed maximum value when creating a query is 1_000. When running 'disable_series' queries, this can be overridden to be up to 10_000, so the maximum value returned from the API when fetching a query may be up to 10_000.
    - `start_time` integer — Absolute start time of query, in seconds since UNIX epoch. Must be <= `end_time`.
    - `end_time` integer — Absolute end time of query, in seconds since UNIX epoch.
    - `time_range` integer — Time range of query in seconds. Can be used with either `start_time` (seconds after `start_time`), `end_time` (seconds before `end_time`), or without either (seconds before now).
    - `havings` object[] — The Having clause allows you to filter on the results table. This operation is distinct from the Where clause, which filters the underlying events. Order By allows you to order the results, and Having filters them. Formulas and calculations with name properties can be referenced by putting the name in the column property.
      - `calculate_op` 'COUNT' | 'CONCURRENCY' | 'SUM' | 'AVG' | 'COUNT_DISTINCT' | 'MAX' | 'MIN' | 'P001' | 'P01' | 'P05' | 'P10' | 'P20' | 'P25' | 'P50' | 'P75' | 'P80' | 'P90' | 'P95' | 'P99' | 'P999' | 'RATE_AVG' | 'RATE_SUM' | 'RATE_MAX', required
      - `column` string, nullable — The name of the column to filter against. This can also be a calculation or formula name.
      - `op` '=' | '!=' | '>' | '>=' | '<' | '<='
      - `value` number
    - `calculated_fields` object[] — Computed properties that are calculated by a formula.
      - `name` string, required — The field name
      - `expression` string, required — The formula for your Calculated Field. To learn more about syntax and available functions, and to explore some example formulas, visit [Calculated Field Formula Reference](https://docs.honeycomb.io/reference/derived-column-formula/).
    - `compare_time_offset_seconds` 1800 | 3600 | 7200 | 28800 | 86400 | 604800 | 2419200 | 15724800 — When set, offsets the query's time range by this number of seconds into the past, allowing comparison with historical data from an earlier time period. For example, setting this to 86400 (24 hours) will compare current results against data from 24 hours ago. ##### Note - The offset must be greater than or equal to the query's time range duration. ##### Allowed values - same time range as query time range - `1800` - 30 minutes - `3600` - 1 hour - `7200` - 2 hours - `28800` - 8 hours - `86400` - 24 hours - `604800` - 7 days - `2419200` - 28 days - `15724800` - 6 months
    - `usage_mode` boolean — If `true`, query results will return aggregates without correcting for sample rates. This is useful for understanding the actual volume of data stored rather than the estimated original event counts. By default, aggregates are adjusted to reflect the estimated original event volume based on sample rates. Note: This field is not supported for triggers.
  - `id` string — The unique identifier (ID) of a Query Result
  - `complete` boolean — Indicates if the query results are available yet or not. For example, is the query still being processed or complete?
  - `data` object — An object containing the query result data
    - `series` QueryResultsSeries[] — Timeseries data from the query result (equivalent to the graph data in the Honeycomb UI)
      - `data` object
    - `results` QueryResultsData[] — Query results data (equivalent to the Overview in the Honeycomb UI below the graph)
      - `data` object
    - `total_by_aggregate` QueryResultsData — Query result details
      - `data` object
    - `total_by_aggregate_series` QueryResultsSeries[] — Timeseries data showing the total value of each aggregate returned in `total_by_aggregate` across the time range. Aggregate values returned do not respect any Having clauses included in a query. Only available if both `disable_total_by_aggregate` and `disable_series` are set to `false`.
      - `data` object
    - `other_by_aggregate` QueryResultsData — Query result details
      - `data` object
  - `links` object — An object containing UI links to the query result and query result graph
    - `query_url` string — A link to the query result in the Honeycomb UI
    - `graph_image_url` string — A direct link to the graph image from the query result

## Other responses

- `404` — Not Found
- `default` — Error

---

[API](https://skmtc.net/honeycomb/apis/honeycomb-api.md) · [All operations](https://skmtc.net/honeycomb/apis/honeycomb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/honeycomb/honeycomb-api/revisions/117619fac2a5/schema)
