> ## 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.

# Get test cases

> Get list of test cases with pagination and filtering options. See [Datasets](https://docs.galtea.ai/concepts/product/dataset).

> [!WARNING]
>
> You are reading the docs of Galtea 5.10. [Read this page in the latest version](https://docs.galtea.ai/api-reference/test-cases/get-test-cases.md).


## OpenAPI

````yaml /v5.10/openapi.json get /testCases
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:
  /testCases:
    get:
      tags:
        - test-cases
      summary: Get test cases
      description: >-
        Get list of test cases with pagination and filtering options. See
        [Datasets](https://docs.galtea.ai/concepts/product/dataset).
      operationId: getTestCases
      parameters:
        - name: ids
          in: query
          style: form
          explode: true
          description: Filter by test case IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: testIds
          in: query
          style: form
          explode: true
          description: Filter by test IDs
          required: false
          schema:
            type: array
            items:
              type: string
        - name: input
          in: query
          description: >-
            Case-insensitive substring filter applied across the test case input
            JSON values
          required: false
          schema:
            type: string
        - name: reviewed
          in: query
          description: Filter by review status
          required: false
          schema:
            type: boolean
        - name: userScore
          in: query
          description: Filter by user score
          required: false
          schema:
            type: integer
        - name: variants
          in: query
          style: form
          explode: true
          description: Filter by variants
          required: false
          schema:
            type: array
            items:
              type: string
        - name: strategies
          in: query
          style: form
          explode: true
          description: Filter by strategies
          required: false
          schema:
            type: array
            items:
              type: string
        - name: languages
          in: query
          style: form
          explode: true
          description: Filter by language codes
          required: false
          schema:
            type: array
            items:
              type: string
        - name: sourceFiles
          in: query
          style: form
          explode: true
          description: Filter by source files
          required: false
          schema:
            type: array
            items:
              type: string
        - name: expectedTools
          in: query
          style: form
          explode: true
          description: Filter by expected tools
          required: false
          schema:
            type: array
            items:
              type: string
        - name: isAugmented
          in: query
          description: Filter by augmentation status
          required: false
          schema:
            type: boolean
        - name: includeLegacy
          in: query
          description: >-
            Include superseded revisions. Defaults to true; pass false to return
            only the active head of each revision family (legacyAt is null).
          required: false
          schema:
            type: boolean
        - name: sort
          in: query
          style: form
          explode: true
          description: Sort instructions (field and direction pairs)
          required: false
          schema:
            type: array
            items:
              type: string
        - name: limit
          in: query
          description: Maximum number of results
          required: false
          schema:
            type: integer
        - name: offset
          in: query
          description: Number of results to skip
          required: false
          schema:
            type: integer
        - name: fromCreatedAt
          in: query
          description: >-
            Filter test cases created at or after this timestamp (ISO 8601
            format)
          required: false
          schema:
            type: string
            format: date-time
        - name: toCreatedAt
          in: query
          description: >-
            Filter test cases created at or before this timestamp (ISO 8601
            format)
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Test cases retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TestCase'
        '400':
          description: Invalid request parameters (e.g. malformed sort).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    TestCase:
      type: object
      properties:
        id:
          type: string
          example: tc_123
        testId:
          type: string
          example: test_123
        userId:
          type: string
          nullable: true
          example: user_123
        input:
          type: object
          nullable: true
          description: >-
            Structured input data. For plain text input, format is {
            user_message: "..." }. Uploaded files ride a `content` array of
            parts, each `{ type: "file", uri, filename, mimeType }`, beside an
            optional `user_message`. `mimeType` is filled from the stored object
            when omitted. `filename` is filled only where the storage records
            it: AWS does, Azure Blob does not, so send `filename` on an Azure
            deployment. Every **file** part is returned with a server-measured
            `sizeBytes`; a value sent for it is ignored.
          example:
            user_message: Summarize this contract
            content:
              - type: file
                uri: https://files.galtea.ai/files/org_123/2f6c….pdf
                filename: contrato-arrendamiento.pdf
                mimeType: application/pdf
                sizeBytes: 1468006
        expectedOutput:
          type: string
          nullable: true
          example: Paris
        expectedTools:
          type: array
          items:
            type: string
          example:
            - search
            - calculator
        context:
          type: object
          nullable: true
          description: >-
            Structured context data. For plain text context, format is { value:
            "..." }
          example:
            value: Geography question
        source:
          type: string
          nullable: true
          example: manual
        sourceFile:
          type: string
          nullable: true
        confidence:
          type: number
          nullable: true
          example: 0.95
        confidenceReason:
          type: string
          nullable: true
          example: High quality data
        variant:
          type: string
          nullable: true
          example: VARIANT_1
        strategy:
          type: string
          nullable: true
          example: STRATEGY_1
        languageCode:
          type: string
          nullable: true
          example: es-MX
          description: >-
            BCP-47 language tag (e.g. en, es-MX). The region subtag selects the
            regional variety in simulated user messages and voice synthesis;
            generated test text keeps the base language. The value is stored as
            the full tag. A bare code for ca, de, es, eu, fr, gl, it, nl or pt
            defaults to the European variety of that language, in simulated user
            messages only (pt -> pt-PT); an explicit region always overrides it,
            and neither voice synthesis nor the stored value is affected.
        gender:
          type: string
          nullable: true
          enum:
            - MALE
            - FEMALE
          example: FEMALE
          description: >-
            Persona-derived gender ("MALE"/"FEMALE") for the male/female
            synthesized caller voice in phone (voice) evaluations. Stored only
            for now (not consumed yet). Ignored by text evaluations.
        backgroundNoiseProfile:
          type: string
          nullable: true
          enum:
            - office
            - street
            - car
            - white
            - pink
          example: street
          description: >-
            Background noise mixed into the simulated caller audio during a
            voice test. Clip-backed (office, street, car) or synthetic (white,
            pink). Null means off; set together with backgroundNoiseLevel.
        backgroundNoiseLevel:
          type: string
          nullable: true
          enum:
            - light
            - medium
            - heavy
          example: medium
          description: >-
            How loud the background noise is relative to the caller speech. Null
            means off; set together with backgroundNoiseProfile.
        userPersona:
          type: string
          nullable: true
          example: Student
        scenario:
          type: string
          nullable: true
          example: Educational quiz
        goal:
          type: string
          nullable: true
          example: Test geographical knowledge
        archetype:
          type: string
          nullable: true
          example: data_grounded
        specRelevance:
          type: string
          nullable: true
          example: direct
        stoppingCriterias:
          type: array
          items:
            type: string
          example:
            - MAX_ITERATIONS
            - GOAL_ACHIEVED
        maxIterations:
          type: integer
          nullable: true
          example: 10
        isAugmented:
          type: boolean
          example: false
        reviewedById:
          type: string
          nullable: true
          example: user_456
        userScore:
          type: integer
          nullable: true
          example: 5
        userScoreReason:
          type: string
          nullable: true
          example: Accurate and complete
        creditsUsed:
          type: integer
          nullable: true
          example: 1
        sourceTestCaseId:
          type: string
          nullable: true
        testCaseGroupId:
          type: string
          nullable: true
          description: Revision family key shared by every revision of this test case.
          example: testCaseGroup_123
        parentTestCaseId:
          type: string
          nullable: true
          description: The revision this row was forked from; null for a family root.
        legacyAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            Set when this revision was superseded by a newer one; null for the
            active head.
        conversationHistory:
          type: array
          writeOnly: true
          description: >-
            Predefined conversation for this SCENARIOS test case. The API stores
            it as a seed session and returns that session id in seedSessionId.
            Write-only: the array itself is never echoed back, read the
            predefined conversation through the seed session. Sending it again
            replaces the predefined conversation; an identical array changes
            nothing. Omit the field to leave the predefined conversation
            untouched; null is rejected. Cannot be sent together with
            seedSessionId, which is the other way to give this test case a
            conversation.
          items:
            type: object
            required:
              - role
              - content
            properties:
              role:
                type: string
                enum:
                  - user
                  - assistant
                example: user
              content:
                type: string
                example: I want to open an account
        seedSessionId:
          type: string
          nullable: true
          description: >-
            Read and write mean different things here, and the two ids are never
            the same session. On a response it is the seed session holding this
            test case predefined conversation, or null when it has none. On a
            request it is the SOURCE session to copy, which must be a session of
            this test product. The API answers with the id of the copy it made,
            never with the id you sent. Omit it, send null, or send back the id
            the response gave you, and the predefined conversation stays as it
            is. There is no way to remove a predefined conversation. Cannot be
            sent together with conversationHistory, the other way to give this
            test case a conversation.
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          nullable: true
          format: date-time
    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.