> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get session annotations filtered by session_ids and/or identifier.

> Return session annotations for a project, filtered by `session_ids`, `identifier`, or both. At least one of `session_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.



## OpenAPI

````yaml get /v1/projects/{project_identifier}/session_annotations
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/projects/{project_identifier}/session_annotations:
    get:
      tags:
        - annotations
      summary: Get session annotations filtered by session_ids and/or identifier.
      description: >-
        Return session annotations for a project, filtered by `session_ids`,
        `identifier`, or both. At least one of `session_ids` or `identifier`
        must be supplied. When both are supplied, results are the
        AND-intersection of the two filters.
      operationId: listSessionAnnotationsBySessionIds
      parameters:
        - name: project_identifier
          in: path
          required: true
          schema:
            type: string
            description: >-
              The project identifier: either project ID or project name. If
              using a project name as the identifier, it cannot contain slash
              (/), question mark (?), or pound sign (#) characters.
            title: Project Identifier
          description: >-
            The project identifier: either project ID or project name. If using
            a project name as the identifier, it cannot contain slash (/),
            question mark (?), or pound sign (#) characters.
        - name: session_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Optional list of session ids to fetch annotations for. If omitted,
              `identifier` must be supplied.
            title: Session Ids
          description: >-
            Optional list of session ids to fetch annotations for. If omitted,
            `identifier` must be supplied.
        - name: identifier
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  minLength: 1
              - type: 'null'
            description: >-
              Optional list of annotation identifiers to filter by. Each value
              must be non-empty. If omitted, `session_ids` must be supplied.
              When combined with `session_ids`, results are the AND-intersection
              of both filters.
            title: Identifier
          description: >-
            Optional list of annotation identifiers to filter by. Each value
            must be non-empty. If omitted, `session_ids` must be supplied. When
            combined with `session_ids`, results are the AND-intersection of
            both filters.
        - name: include_annotation_names
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Optional list of annotation names to include. If provided, only
              annotations with these names will be returned (allowlist). When
              omitted, the response includes every matching row regardless of
              name (no annotation names are excluded by default).
            title: Include Annotation Names
          description: >-
            Optional list of annotation names to include. If provided, only
            annotations with these names will be returned (allowlist). When
            omitted, the response includes every matching row regardless of name
            (no annotation names are excluded by default).
        - name: exclude_annotation_names
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Optional list of annotation names to exclude from results.
            title: Exclude Annotation Names
          description: Optional list of annotation names to exclude from results.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: A cursor for pagination
            title: Cursor
          description: A cursor for pagination
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            exclusiveMinimum: 0
            description: The maximum number of annotations to return in a single request
            default: 10
            title: Limit
          description: The maximum number of annotations to return in a single request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionAnnotationsResponseBody'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '404':
          content:
            text/plain:
              schema:
                type: string
          description: Project or sessions not found
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: Invalid parameters
components:
  schemas:
    SessionAnnotationsResponseBody:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SessionAnnotation'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - data
        - next_cursor
      title: SessionAnnotationsResponseBody
    SessionAnnotation:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        source:
          type: string
          enum:
            - API
            - APP
          title: Source
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        name:
          type: string
          title: Name
          description: The name of the annotation
        annotator_kind:
          type: string
          enum:
            - LLM
            - CODE
            - HUMAN
          title: Annotator Kind
          description: The kind of annotator used for the annotation
        result:
          anyOf:
            - $ref: '#/components/schemas/AnnotationResult'
            - type: 'null'
          description: The result of the annotation
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Metadata for the annotation
        identifier:
          type: string
          title: Identifier
          description: >-
            The identifier of the annotation. If provided, the annotation will
            be updated if it already exists.
          default: ''
        session_id:
          type: string
          title: Session Id
          description: Session ID
      type: object
      required:
        - id
        - created_at
        - updated_at
        - source
        - user_id
        - name
        - annotator_kind
        - session_id
      title: SessionAnnotation
    AnnotationResult:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
          description: The label assigned by the annotation
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
          description: The score assigned by the annotation
        explanation:
          anyOf:
            - type: string
            - type: 'null'
          title: Explanation
          description: Explanation of the annotation result
      type: object
      title: AnnotationResult

````