> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Test Cases For A Given Agent

> List test cases for a given agent



## OpenAPI

````yaml get /v1/orchestrate/agent/{agent_id}/test_case
openapi: 3.1.0
info:
  title: WxO Server API
  summary: API for the next gen watsonx Orchestrate stack
  description: >+

    The watsonx Orchestrate Server provides a set of APIs to power the watsonx
    Orchestrate AI assistant. This includes the following core services:


    * Orchestrate Assistant - a built-in AI assistant that powers the
    Orchestrate end-user experience.

    * Custom Assistants - a service layer for interacting with existing AI
    assistatns (such as those in watsonx Assistant).

    * Message Threads - a chat history and async message tracking store.

    * Document Store - manage collections of documents in nearly any format
    including text, pdf, html and many more.

    * Information Extraction - automatically extract clean text and images from
    any document in the Document Store.  Also extract other useful metadata like
    questions answered, keywords, and named entities.

    * Embedding - generate vector embeddings for text and images in the Document
    Store.

    * Vector Index and Retrieval - automatically index documents with rich
    metadata for vector search or hybrid search.

    * Search Engine - create a Gen AI powered search engine that works like Bing
    or Google.

    * Query Engine - configure your own RAG (Retrieval Augmented Generation)
    engine supporting advanced retrieval patterns and automated data management.

    * Model Proxy - create your own LLM model endpoints for chat completions and
    embeddings.  Supports IBM watsonx.ai, IBM BAM, OpenAI, MistralAI, or Ollama
    for local models.


    WxO API Server utilizes the following open source projects:


    * [PostgreSQL](https://www.postgresql.org/)

    * [PGVector](https://github.com/pgvector/pgvector)

    * [LlamaIndex](https://docs.llamaindex.ai/en/stable/)

    * [LangChain](https://python.langchain.com/docs/get_started/introduction)

    * [FastAPI](https://fastapi.tiangolo.com/)

    * [Unstructured](https://unstructured.io/)

    * [Celery](https://docs.celeryproject.org/en/stable/)

  version: 0.1.0
servers:
  - url: https://{api_endpoint}
    description: version
security: []
paths:
  /v1/orchestrate/agent/{agent_id}/test_case:
    get:
      tags:
        - Agent Evaluation
      summary: List Test Cases For A Given Agent
      description: List test cases for a given agent
      operationId: >-
        List_test_cases_for_a_given_agent_v1_orchestrate_agent__agent_id__test_case_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: query
          in: query
          required: false
          schema:
            type: string
            description: Search prompt
            default: ''
            title: Query
          description: Search prompt
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Limit the number of results returned
            default: 5
            title: Limit
          description: Limit the number of results returned
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Skip the first N results
            default: 0
            title: Offset
          description: Skip the first N results
        - name: sortkey
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortKey'
            description: Sort key
            default: created_date
          description: Sort key
        - name: sort
          in: query
          required: false
          schema:
            $ref: >-
              #/components/schemas/wo_archer__observability__models__base__SortOptions
            description: Sort order
            default: desc
          description: Sort order
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestCasesListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SortKey:
      type: string
      enum:
        - created_date
        - executed_date
        - prompt
      title: SortKey
    wo_archer__observability__models__base__SortOptions:
      type: string
      enum:
        - asc
        - desc
      title: SortOptions
    TestCasesListResponse:
      properties:
        total:
          type: integer
          title: Total
          description: Total number of test cases
        page:
          type: integer
          title: Page
          description: Current page
        page_size:
          type: integer
          title: Page Size
          description: Number of results per page
        test_cases:
          items:
            $ref: '#/components/schemas/TestCaseResponse'
          type: array
          title: Test Cases
          description: List of test cases in this page
      type: object
      required:
        - total
        - page
        - page_size
        - test_cases
      title: TestCasesListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TestCaseResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Test case ID
        prompt:
          type: string
          title: Prompt
          description: Prompt text
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: Created date
        executed_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Executed Date
          description: Last executed date
      type: object
      required:
        - id
        - prompt
        - created_date
      title: TestCaseResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````