> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List annotations

> List the annotations of a metric, of a session, or of both, oldest first. The metricId is a metric id: a revision id matches nothing. The list and its total hold only the products where the caller may read evaluations. An annotation belongs to a case (a session, or one turn of it) and a metric, not to an evaluation: every revision of the metric shows it. See [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).



## OpenAPI

````yaml /openapi.json get /annotations
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /annotations:
    get:
      tags:
        - annotations
      summary: List annotations
      description: >-
        List the annotations of a metric, of a session, or of both, oldest
        first. The metricId is a metric id: a revision id matches nothing. The
        list and its total hold only the products where the caller may read
        evaluations. An annotation belongs to a case (a session, or one turn of
        it) and a metric, not to an evaluation: every revision of the metric
        shows it. See
        [Evaluations](https://docs.galtea.ai/concepts/product/version/session/evaluation).
      operationId: listAnnotations
      parameters:
        - schema:
            type: string
            minLength: 1
            description: >-
              Metric ID, shared by every revision of the metric. A revision ID
              answers 404.
            example: metric_123
          required: false
          description: >-
            Metric ID, shared by every revision of the metric. A revision ID
            answers 404.
          name: metricId
          in: query
        - schema:
            type: string
            minLength: 1
            description: Session ID.
            example: session_123
          required: false
          description: Session ID.
          name: sessionId
          in: query
        - schema:
            type: integer
            minimum: 0
            maximum: 1000
            default: 100
            description: Maximum number of results
          required: false
          description: Maximum number of results
          name: limit
          in: query
        - schema:
            type: integer
            minimum: 0
            default: 0
            description: Number of results to skip
          required: false
          description: Number of results to skip
          name: offset
          in: query
      responses:
        '200':
          description: Annotations retrieved successfully
          headers:
            Content-Range:
              schema:
                type: string
                description: >-
                  Pagination range as `annotations
                  <offset>-<upperBound>/<total>`.
              required: true
              description: Pagination range as `annotations <offset>-<upperBound>/<total>`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Annotation'
        '400':
          description: Invalid query parameter, or neither `metricId` nor `sessionId`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No user group of the caller lists evaluation.read
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Annotation:
      type: object
      properties:
        id:
          type: string
          example: annotation_123
        sessionId:
          type: string
          example: session_123
          description: The annotated session.
        metricId:
          type: string
          description: >-
            Metric ID, shared by every revision of the metric. A revision ID
            answers 404.
          example: metric_123
        inferenceResultId:
          type: string
          nullable: true
          example: inferenceResult_123
          description: >-
            The annotated turn of the session. Null for an annotation of the
            whole session.
        annotatorId:
          type: string
          nullable: true
          example: user_123
          description: The user who last wrote the score. Null once that user is deleted.
        score:
          type: number
          example: 0.75
          description: The human score, from 0 to 1.
        reason:
          type: string
          nullable: true
          example: Accurate
          description: Why the annotator gave this score.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - sessionId
        - metricId
        - inferenceResultId
        - annotatorId
        - score
        - reason
        - createdAt
        - updatedAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.