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

# Re-run a batch

> Create a new group-run batch from the runnable tests in a prior batch. Deleted, disabled, or malformed tests are skipped and returned as `skippedTestIds`.



## OpenAPI

````yaml /openapi.json post /v1/batches/{batchId}/rerun
openapi: 3.0.0
info:
  title: TestArmy API
  version: 1.0.0
  description: >-
    AI-powered browser automation API for QA testing. Automate web testing
    workflows using natural language prompts.
servers:
  - url: https://tester.army/api
    description: Production API server
security: []
paths:
  /v1/batches/{batchId}/rerun:
    post:
      tags:
        - Test Runs
      summary: Re-run a batch
      description: >-
        Create a new group-run batch from the runnable tests in a prior batch.
        Deleted, disabled, or malformed tests are skipped and returned as
        `skippedTestIds`.
      parameters:
        - schema:
            type: string
            format: uuid
            description: Source batch ID
          required: true
          description: Source batch ID
          name: batchId
          in: path
      responses:
        '202':
          description: Batch re-run queued successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - queued
                      - cancelled
                  groupId:
                    type: string
                    format: uuid
                  batchId:
                    type: string
                    format: uuid
                  sourceBatchId:
                    type: string
                    format: uuid
                  runIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  queuedRunIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  cancelledRunIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  skippedTestIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  count:
                    type: integer
                required:
                  - status
                  - groupId
                  - batchId
                  - sourceBatchId
                  - runIds
                  - queuedRunIds
                  - cancelledRunIds
                  - skippedTestIds
                  - count
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '404':
          description: Batch not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '409':
          description: Conflict - Batch cannot be re-run
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '429':
          description: Too Many Requests - Usage limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
        '504':
          description: Gateway Timeout - Test execution exceeded time limit
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code or type
                  message:
                    type: string
                    description: Human-readable error message
                required:
                  - error
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication using Bearer token format

````