honeycomb Query Annotations API

Associate names and descriptions to queries for collaboration features.

GitHub OpenAPI
Business capability
Observability Management BC-4220.20

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /1/query_annotations/{datasetSlug} Annotate a query with a note · Create a Query Annotation #
Ask an LLM
“How do I annotate a query with a name and description?”
“Can I attach a note to a query so my team knows why it was written?”
Tell an agent
Create an annotation {name} on query {query_id} in {datasetSlug}.
Annotate query {query_id} in {datasetSlug} with the note {name} described as {description}.
GET /1/query_annotations/{datasetSlug} List query annotations in a dataset · List Query Annotations #
Ask an LLM
“Which queries have annotations attached in my dataset?”
“Can I include board annotations when listing query annotations?”
Tell an agent
List query annotations in dataset {datasetSlug}.
Show all annotations in {datasetSlug}, including board annotations.
GET /1/query_annotations/{datasetSlug}/{queryAnnotationId} Get a query annotation · Get a Query Annotation #
Ask an LLM
“What does a particular query annotation say on my queries?”
“Can I look up a query annotation by its ID?”
Tell an agent
Get query annotation {queryAnnotationId} from dataset {datasetSlug}.
Show the comment on query annotation {queryAnnotationId}.
PUT /1/query_annotations/{datasetSlug}/{queryAnnotationId} Rename or redescribe a query annotation · Update a Query Annotation #
Ask an LLM
“Can I change the description of an existing query annotation?”
“Is it possible to rename a query annotation after creating it?”
Tell an agent
Update annotation {queryAnnotationId} in {datasetSlug} to name {name} and query {query_id}.
Change the description of query annotation {queryAnnotationId} in {datasetSlug} to {description}, keeping name {name} and query {query_id}.
DELETE /1/query_annotations/{datasetSlug}/{queryAnnotationId} Delete a query annotation · Delete a Query Annotation #
Ask an LLM
“How do I remove a query annotation I added by mistake?”
“Can I delete a query annotation by its ID?”
Tell an agent destructive · confirm first
Delete query annotation {queryAnnotationId} from dataset {datasetSlug}.
Remove the query annotation {queryAnnotationId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/honeycomb:honeycomb-query-annotations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

honeycomb-query-annotations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Honeycomb Query Annotations API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: support@honeycomb.io
  description: 'The API allows programmatic management of many resources within Honeycomb.


    Please report any discrepancies with actual API behavior in Pollinators Slack or to Honeycomb Support.'
servers:
- url: https://api.honeycomb.io
- url: https://api.eu1.honeycomb.io
tags:
- name: Query Annotations
  description: 'Query Annotations in Honeycomb allow you to associate names and descriptions to queries to add additional information in collaboration features.


    This API allows you to list, create, update, and delete Query Annotations.


    ## Authorization


    The API key must have the **Manage Queries and Columns** permission. Learn more about API keys here.'
paths:
  /1/query_annotations/{datasetSlug}:
    parameters:
    - $ref: '#/components/parameters/datasetSlugOrAll'
    post:
      security:
      - configuration_key: []
      summary: Create a Query Annotation
      description: Create a Query Annotation for the specified query ID.
      tags:
      - Query Annotations
      operationId: createQueryAnnotation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryAnnotation'
        required: true
      responses:
        '201':
          description: Created
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryAnnotation'
        '400':
          description: Bad Request
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-query-id:
                  description: The query ID is invalid.
                  value:
                    error: Query ID included in body is invalid
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/GenericError'
    get:
      security:
      - configuration_key: []
      summary: List Query Annotations
      description: List all Query Annotations in the specified dataset.
      tags:
      - Query Annotations
      operationId: listQueryAnnotations
      parameters:
      - name: include_board_annotations
        in: query
        description: 'Whether to include Query Annotations that were created from boards. By default, only Query Annotations created directly from queries are returned.

          '
        schema:
          type: boolean
          default: false
        required: false
      responses:
        '200':
          description: Success
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryAnnotation'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/GenericError'
  /1/query_annotations/{datasetSlug}/{queryAnnotationId}:
    parameters:
    - $ref: '#/components/parameters/datasetSlugOrAll'
    - name: queryAnnotationId
      description: The unique identifier (ID) of the annotation.
      in: path
      required: true
      schema:
        type: string
    get:
      security:
      - configuration_key: []
      summary: Get a Query Annotation
      description: Get a Query Annotation by its ID.
      tags:
      - Query Annotations
      operationId: getQueryAnnotation
      responses:
        '200':
          description: Success
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryAnnotation'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/GenericError'
    put:
      security:
      - configuration_key: []
      summary: Update a Query Annotation
      description: Update a Query Annotation by specifying its ID. The Query ID associated with the Query Annotation cannot be updated. Partial updates are not supported.
      tags:
      - Query Annotations
      operationId: updateQueryAnnotation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryAnnotation'
            example:
              name: My Updated Annotation
              description: A nice description of My Update Annotation
              query_id: mabAMpSPDjH
              id: sGUnkBHgRFN
              created_at: '2022-10-26T21:36:04Z'
              updated_at: '2022-12-16T10:44:08Z'
        required: true
      responses:
        '200':
          description: Success
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryAnnotation'
              example:
                name: My Updated Annotation
                description: A nice description of My Update Annotation
                query_id: mabAMpSPDjH
        '400':
          description: Bad Request
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                update-includes-bad-id:
                  description: The ID in the URL and the ID in the request body do not match.
                  value:
                    error: Query annotation id included in body does not match URL
                invalid-query-id:
                  description: The query ID is invalid.
                  value:
                    error: Query id included in body is invalid
                cannot-update-query-id:
                  description: The query ID cannot be updated.
                  value:
                    error: queries in annotations cannot be changed
                query-not-in-dataset:
                  description: The query ID does not exist in the specified dataset.
                  value:
                    error: Query is not in the dataset
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/GenericError'
    delete:
      security:
      - configuration_key: []
      summary: Delete a Query Annotation
      description: Delete a Query Annotation by specifying its ID.
      tags:
      - Query Annotations
      operationId: deleteQueryAnnotation
      responses:
        '204':
          description: Success - no content
          headers:
            Ratelimit:
              $ref: '#/components/headers/RateLimit'
            RateLimitPolicy:
              $ref: '#/components/headers/RateLimitPolicy'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        default:
          $ref: '#/components/responses/GenericError'
components:
  headers:
    RateLimitPolicy:
      description: "The (draft07) recommended header from the IETF on rate limiting.\nThe value of the header is formatted \"X;w=Y\".\nWhere:\n - X is the maximum number of requests allowed in a window\n - Y is the size of the window in seconds\n"
      schema:
        type: string
      example: 100;w=60
    RateLimit:
      description: "The (draft07) recommended header from the IETF on rate limiting.\nThe value of the header is formatted \"limit=X, remaining=Y, reset=Z\".\nWhere:\n  - X is the maximum number of requests allowed in the window\n  - Y is the number of requests remaining in the window\n  - Z is the number of seconds until the limit resets\n"
      schema:
        type: string
      example: limit=100, remaining=50, reset=60
    RetryAfter:
      description: 'The RFC7231 header used to indicate when a client should retry requests.

        '
      schema:
        type: string
      example: Fri, 22 Mar 2024 18:37:53 GMT
  responses:
    NotFound:
      description: Not Found
      headers:
        Ratelimit:
          $ref: '#/components/headers/RateLimit'
        RateLimitPolicy:
          $ref: '#/components/headers/RateLimitPolicy'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: dataset not found
        application/problem+json:
          schema:
            $ref: '#/components/schemas/DetailedError'
          example:
            status: 404
            type: https://api.honeycomb.io/problems/not-found
            title: The requested resource cannot be found.
            error: Dataset not found
            detail: Dataset not found
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JSONAPIError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            deny-management-apis:
              description: Team cannot access management APIs.
              value:
                error: Your team has been denied access to Management APIs, please contact support to be unblocked.
        application/problem+json:
          schema:
            $ref: '#/components/schemas/DetailedError'
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JSONAPIError'
    GenericError:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate Limit Exceeded
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        Ratelimit:
          $ref: '#/components/headers/RateLimit'
        RateLimitPolicy:
          $ref: '#/components/headers/RateLimitPolicy'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate Limited
        application/problem+json:
          schema:
            $ref: '#/components/schemas/DetailedError'
          example:
            status: 429
            type: https://api.honeycomb.io/problems/rate-limited
            title: You have exceeded your rate limit.
            error: You have exceeded your rate limit.
            detail: Please try again after 2025-02-01T15:23:12Z.
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/JSONAPIError'
          example:
            errors:
            - id: 06dcdd6508ca822f0e7e2bb4121c1f52
              code: rate-limited/may-retry
              title: request rate limit exceeded
              detail: Please try again after 2025-02-01T15:23:12Z.
  schemas:
    Error:
      x-tags:
      - Errors
      type: object
      description: A legacy error, containing only a textual description.
      properties:
        error:
          type: string
          readOnly: true
    JSONAPIError:
      x-tags:
      - Errors
      type: object
      description: A JSONAPI-formatted error message.
      properties:
        errors:
          type: array
          items:
            type: object
            readOnly: true
            required:
            - id
            - code
            properties:
              id:
                type: string
                readOnly: true
              status:
                type: string
                readOnly: true
              code:
                type: string
                readOnly: true
              title:
                type: string
                readOnly: true
              detail:
                type: string
                readOnly: true
              source:
                type: object
                readOnly: true
                properties:
                  pointer:
                    type: string
                    readOnly: true
                  header:
                    type: string
                    readOnly: true
                  parameter:
                    type: string
                    readOnly: true
    DetailedError:
      x-tags:
      - Errors
      description: An RFC7807 'Problem Detail' formatted error message.
      type: object
      required:
      - error
      - status
      - type
      - title
      properties:
        error:
          type: string
          readOnly: true
          default: something went wrong!
        status:
          type: number
          readOnly: true
          description: The HTTP status code of the error.
        type:
          type: string
          readOnly: true
          description: Type is a URI used to uniquely identify the type of error.
        title:
          type: string
          readOnly: true
          description: Title is a human-readable summary that explains the `type` of the problem.
        detail:
          type: string
          readOnly: true
          description: The general, human-readable error message.
        instance:
          type: string
          readOnly: true
          description: The unique identifier (ID) for this specific error.
    QueryAnnotation:
      type: object
      description: A Query Annotation consists of a name and description associated with a query to add context when collaborating.
      required:
      - name
      - query_id
      properties:
        name:
          type: string
          description: A name for the Query.
          example: My Named Query
          minLength: 1
          maxLength: 320
        description:
          type: string
          description: A description of the Query.
          example: A nice description of My Named Query
          maxLength: 1023
        query_id:
          type: string
          description: 'The ID of the Query that the annotation describes. **Note**: Once created, it is NOT possible to change the query ID associated with an annotation. It is possible to have multiple annotations associated with a Query.

            '
          example: mabAMpSPDjH
        id:
          type: string
          description: The unique identifier (ID) of a Query Annotation.
          readOnly: true
          example: sGUnkBHgRFN
        created_at:
          type: string
          format: date-time
          description: ISO8601 formatted time when the Query Annotation was created.
          example: '2022-10-26T21:36:04Z'
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: ISO8601 formatted time when the Query Annotation was updated.
          example: '2022-12-04T08:14:26Z'
          readOnly: true
        source:
          type: string
          description: The source of the Query Annotation.
          example: query
          enum:
          - query
          - board
          readOnly: true
  parameters:
    datasetSlugOrAll:
      name: datasetSlug
      description: 'The dataset slug or use `__all__` for endpoints that support environment-wide operations.

        '
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    configuration_key:
      type: apiKey
      name: X-Honeycomb-Team
      in: header
      description: 'Authenticate using a Honeycomb Configuration Key.


        Pass the **Token** in the `X-Honeycomb-Team` header:

        ```http

        X-Honeycomb-Team: 1234567890123456789012

        ```


        If you created your key using the API, use `data.attributes.secret`; this is the same value as the **Token** in the UI.


        To learn how to create a Configuration Key, visit [Manage Environment API Keys](/configure/environments/manage-api-keys). To learn more about authenticating requests, visit [API Authentication](/api/authentication).

        '
    ingest_key:
      type: apiKey
      name: X-Honeycomb-Team
      in: header
      description: 'Authenticate using a Honeycomb Ingest Key.


        Pass the Ingest Key in the `X-Honeycomb-Team` header:

        ```http

        X-Honeycomb-Team: hc[x]ik_1234567890123456789012345612345678901234567890123456789012

        ```


        The key value is the key ID and key secret concatenated with no separator:

        - If you created your key through the UI, Honeycomb provides the complete value as the **Ingest Key**.

        - If you created your key using the API, construct the key value by concatenating `data.id` and `data.attributes.secret` with no separator.


        To learn how to create an Ingest Key, visit [Manage Environment API Keys](/configure/environments/manage-api-keys). To learn more about authenticating requests, visit [API Authentication](/api/authentication).

        '
    firehose_access_key:
      type: apiKey
      name: X-Amz-Firehose-Access-Key
      in: header
      description: 'We recommend using a Honeycomb Ingest Key to authenticate, though a Configuration Key will work.


        To learn more about authenticating requests, visit [API Authentication](/api/authentication).

        '
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Authenticate using a Honeycomb Management Key.


        Pass the Management Key as a Bearer token in the `Authorization` header:

        ```http

        Authorization: Bearer hcxmk_12345678901234567890123456:12345678901234567890123456789012

        ```


        Construct the key value by joining the **Key ID** and **Secret** with a colon (`:`).


        To learn how to create a Management Key, visit [Manage Team API Keys](/configure/teams/manage-api-keys). To learn more about authenticating requests, visit [API Authentication](/api/authentication).

        '
      bearerFormat: HONEYCOMB_KEY_ID:HONEYCOMB_KEY_SECRET
externalDocs:
  url: https://docs.honeycomb.io