# Create a Query Result Kick off processing of a Query to then get back the Query Results. Once the Query Result has been created, the query will be run asynchronously, allowing the result data to be fetched from the GET query result endpoint. Only the last 7 days of data can be queried. Any queries with a , , or older than last 7 days will result in a error response. Endpoint: POST /1/query_results/{datasetSlug} Version: 1.0.0 Security: configuration_key ## Path parameters: - `datasetSlug` (string, required) The dataset slug or use for endpoints that support environment-wide operations. ## Request fields (application/json): - `query_id` (string, required) The ID of a query returned from the [Queries endpoint](/api/queries/). Example: "mabAMpSPDjH" - `disable_series` (boolean) If , timeseries data will not be returned in the response field, and only summarized data will be returned in the response field. - `disable_total_by_aggregate` (boolean) If , data representing each aggregate in the query's total value will not be returned. Ensure is false to return the timeseries data. - `disable_other_by_aggregate` (boolean) If true, the "other_by_aggregate" data is excluded from the query result. - `limit` (integer) If is , a limit may be optionally given. The limit will override the default limit of 1_000 results with a maximum available limit of 10_000. If is , this field will be ignored. ## Response 201 fields (application/json): - `query` (object) - `query.id` (string) - `query.breakdowns` (array) the columns by which to break events down into groups - `query.calculations` (array) the calculations to return as a time series and summary table - `query.calculations.op` (string, required) Enum: "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" - `query.calculations.column` (null,string) the name of the column - `query.filters` (array) the filters with which to restrict the considered events - `query.filters.column` (null,string) - `query.filters.value` (any) - `query.filter_combination` (string) set to "OR" to match ANY filter in the filter list Enum: "AND", "OR" - `query.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. - `query.orders` (array) The terms on which to order the query results. Each term must appear in either the field or the field. - `query.orders.order` (string) Enum: "ascending", "descending" - `query.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. - `query.start_time` (integer) Absolute start time of query, in seconds since UNIX epoch. Must be <= . - `query.end_time` (integer) Absolute end time of query, in seconds since UNIX epoch. - `query.time_range` (integer) Time range of query in seconds. Can be used with either (seconds after ), (seconds before ), or without either (seconds before now). - `query.havings` (array) 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. - `query.havings.calculate_op` (string, required) Enum: "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" - `query.havings.column` (null,string) The name of the column to filter against - `query.calculated_fields` (array) Computed properties that are calculated by a formula. - `query.calculated_fields.name` (string, required) The field name - `query.calculated_fields.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/). - `id` (string) The unique identifier (ID) of a Query Result. Example: "sGUnkBHgRFN" - `complete` (boolean) Indicates if the query results are available yet or not. For example, is the query still being processed or complete? - `links` (object) An object containing UI links to the query result and query result graph - `links.query_url` (string) Example: "https://ui.honeycomb.io/myteam/datasets/test-via-curl/result/HprJhV1fYy" - `links.graph_image_url` (string) Example: "https://ui.honeycomb.io/myteam/datasets/test-via-curl/result/HprJhV1fYy/snapshot" ## Response 400 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. ## Response 403 fields (application/json): - `error` (string) ## Response 404 fields (application/json): - `error` (string) ## Response 422 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. - `type_detail` (array) - `type_detail.field` (string) - `type_detail.code` (string) Enum: "invalid", "missing", "incorrect_type", "already_exists" - `type_detail.description` (string) ## Response 429 fields (application/problem+json): - `error` (string, required) - `status` (number, required) The HTTP status code of the error. - `type` (string, required) Type is a URI used to uniquely identify the type of error. - `title` (string, required) Title is a human-readable summary that explains the of the problem. - `detail` (string) The general, human-readable error message. - `instance` (string) The unique identifier (ID) for this specific error. ## Response default fields (application/json): - `error` (string)