---
title: "Fetch Annotation"
method: GET
path: "/annotations/{trace_id}"
tags: ["Annotations"]
---

# Fetch Annotation

`GET /annotations/{trace_id}`

## Path parameters

- `trace_id` string, required

## Query parameters

- `span_id` string, nullable

## Response `200`

Successful Response

- AnnotationResponse
  - `count` integer
  - `annotation` Annotation
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `deleted_at` string, date-time, nullable
    - `created_by_id` string, uuid, nullable
    - `updated_by_id` string, uuid, nullable
    - `deleted_by_id` string, uuid, nullable
    - `span_id` string, nullable
    - `trace_id` string, nullable
    - `attributes` object, nullable
    - `origin` 'custom' | 'human' | 'auto'
    - `kind` 'adhoc' | 'eval' | 'play'
    - `channel` 'otlp' | 'web' | 'sdk' | 'api'
    - `tags` object, nullable
    - `meta` object, nullable
    - `data` object, required
    - `references` SimpleTraceReferences, required
      - `query` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `query_variant` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `query_revision` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `testset` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `testset_variant` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `testset_revision` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `application` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `application_variant` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `application_revision` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `evaluator` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `evaluator_variant` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `evaluator_revision` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `environment` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `environment_variant` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `environment_revision` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `testcase` Reference
        - `version` string, nullable
        - `slug` string, nullable
        - `id` string, uuid, nullable
      - `selector` object, nullable
    - `links` union, required
      - object
      - OTelLinkOutput[]
        - `span_id` string, nullable
        - `trace_id` string, nullable
        - `attributes` object, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-31** `06e03dbce2be` — 4 info
  - added the optional property `annotation/anyOf[subschema #1: Annotation]/references/environment` to the response with the `200` status
  - added the optional property `annotation/anyOf[subschema #1: Annotation]/references/environment_revision` to the response with the `200` status
  - added the optional property `annotation/anyOf[subschema #1: Annotation]/references/environment_variant` to the response with the `200` status
  - added the optional property `annotation/anyOf[subschema #1: Annotation]/references/selector` to the response with the `200` status
- **2026-05-19** `a7f9a6823230` — 2 warning
  - removed the optional property `support_id` from the response with the `200` status
  - removed the optional property `support_ts` from the response with the `200` status
- **2026-05-08** `5e6f53ce5d08` — 1 info
  - endpoint added
- **2026-04-16** `8b06b786c977` — 1 breaking
  - api path removed without deprecation
- **2026-03-07** `20311f763505` — 3 info
  - added the optional property `annotation/anyOf[subschema #1: Annotation]/attributes` to the response with the `200` status
  - added `subschema #1, subschema #2` to the `annotation/anyOf[subschema #1: Annotation]/links` response property `anyOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the `annotation/anyOf[subschema #1: Annotation]/links` response property `anyOf` list for the response status `200`

[Full history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/annotations/:trace_id/get.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/06e03dbce2be/schema)
