> ## Documentation Index
> Fetch the complete documentation index at: https://hanabiaiinc-chore-update-openapi-schema.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Test Batches

> The agent's test batches, newest first, with their counts.



## OpenAPI

````yaml get /v1/agent/agents/{agent_id}/test-batches
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/agents/{agent_id}/test-batches:
    get:
      tags:
        - Agent Tests
      summary: List Test Batches
      description: >-
        The agent's test batches, newest first, with their pass, fail and error

        counts. Paginate with `cursor`, following `next_cursor` while `has_more`
        is

        true.
      parameters:
        - in: path
          name: agent_id
          description: ''
          required: true
          schema:
            title: Agent Id
            type: string
          deprecated: false
        - in: query
          name: cursor
          description: ''
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
            title: Cursor
          deprecated: false
        - in: query
          name: page_size
          description: ''
          required: false
          schema:
            default: 30
            maximum: 100
            minimum: 1
            title: Page Size
            type: integer
          deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  batches:
                    items:
                      $ref: '#/components/schemas/PublicAgentTestBatchSummary'
                    title: Batches
                    type: array
                  has_more:
                    title: Has More
                    type: boolean
                  next_cursor:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Next Cursor
                required:
                  - batches
                  - has_more
                type: object
        '400':
          description: Bad request syntax or unsupported method
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
components:
  schemas:
    PublicAgentTestBatchSummary:
      properties:
        batch_id:
          title: Batch Id
          type: string
        agent_id:
          title: Agent Id
          type: string
        status:
          description: running until every run has finished.
          enum:
            - running
            - completed
          title: Status
          type: string
        completed:
          title: Completed
          type: boolean
        passed:
          title: Passed
          type: integer
        failed:
          title: Failed
          type: integer
        errors:
          title: Errors
          type: integer
        pass_rate:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          description: >-
            passed / (passed + failed), null until a run passed or failed. Error
            runs never judged the agent and are left out.
          title: Pass Rate
        run_count:
          title: Run Count
          type: integer
        trigger_source:
          description: 'Where the batch was started: the console or the API.'
          enum:
            - console
            - api
          title: Trigger Source
          type: string
        created_at:
          description: When the first run was created.
          format: date-time
          title: Created At
          type: string
        finished_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          description: When the last run finished, null until the batch completed.
          title: Finished At
      required:
        - batch_id
        - agent_id
        - status
        - completed
        - passed
        - failed
        - errors
        - run_count
        - trigger_source
        - created_at
      title: PublicAgentTestBatchSummary
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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