Query Data

Get Query Result

Changed on

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 <query-result-id>. Note: a query that fails to run still returns HTTP 200. Check the response body: a failed query has "complete": true with an "error" field in place of "data".

get/1/query_results/{datasetSlug}/{queryResultId}

Request

  • Base URL
    https://api.honeycomb.io
  • URL
    https://api.honeycomb.io/1/query_results/{datasetSlug}/{queryResultId}
  • Auth
    API key in header X-Honeycomb-Team

Response

Success

idstring

The unique identifier (ID) of a Query Result

completeboolean

Indicates if the query results are available yet or not. For example, is the query still being processed or complete?

errorstring

Only present if the query failed to run. Contains a human-readable message describing the failure. When set, the "data" field is omitted.

Example response

{
  "id": "sGUnkBHgRFN",
  "complete": true,
  "error": "we had trouble fetching your results! try again?",
  "data": {
    "series": [
      {
        "data": {
          "COUNT": 1,
          "P99(duration_ms)": 210,
          "name": "TestGoogleCallbackLogin",
          "test.classname": "github.com/honeycombio/hound/cmd/poodle/handlers",
          "test.status": "passed"
        }
      }
    ],
    "results": [
      {
        "data": {
          "COUNT": 1,
          "P99(duration_ms)": 210,
          "name": "TestGoogleCallbackLogin",
          "test.classname": "github.com/honeycombio/hound/cmd/poodle/handlers",
          "test.status": "passed"
        }
      }
    ],
    "total_by_aggregate": {
      "data": {
        "COUNT": 1,
        "P99(duration_ms)": 210,
        "name": "TestGoogleCallbackLogin",
        "test.classname": "github.com/honeycombio/hound/cmd/poodle/handlers",
        "test.status": "passed"
      }
    },
    "total_by_aggregate_series": [
      {
        "data": {
          "COUNT": 1,
          "P99(duration_ms)": 210,
          "name": "TestGoogleCallbackLogin",
          "test.classname": "github.com/honeycombio/hound/cmd/poodle/handlers",
          "test.status": "passed"
        }
      }
    ],
    "other_by_aggregate": {
      "data": {
        "COUNT": 1,
        "P99(duration_ms)": 210,
        "name": "TestGoogleCallbackLogin",
        "test.classname": "github.com/honeycombio/hound/cmd/poodle/handlers",
        "test.status": "passed"
      }
    }
  },
  "links": {
    "query_url": "https://ui.honeycomb.io/myteam/datasets/test-via-curl/result/HprJhV1fYy",
    "graph_image_url": "https://ui.honeycomb.io/myteam/datasets/test-via-curl/result/HprJhV1fYy/snapshot"
  }
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property ///// to the response with the status