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

# Get Task Batch

> Returns the status and results of a task batch



## OpenAPI

````yaml /api-reference/openapi.json get /private-api/v1/{workspace_id}/farms/{farm_id}/tasks/batches/{batch_id}
openapi: 3.1.0
info:
  title: Nonce Private API
  description: |-
    Nonce Private API documentation - Internal endpoints for system integration

    Generated by NestJS Swagger Module with nestjs-zod
    Scope: Private API endpoints only (/private-api/*)
    Do not edit this file manually - regenerate with: pnpm run docs:openapi
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.nonce.app
    description: Production server
security: []
tags: []
paths:
  /private-api/v1/{workspace_id}/farms/{farm_id}/tasks/batches/{batch_id}:
    get:
      tags:
        - Private API
        - Task
      summary: Get Task Batch
      description: Returns the status and results of a task batch
      operationId: GetTaskBatch
      parameters:
        - name: workspace_id
          required: true
          in: path
          schema:
            type: string
        - name: farm_id
          required: true
          in: path
          schema:
            type: string
        - name: batch_id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved task batch
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    description: Indicates if the request was successful
                  data:
                    anyOf:
                      - type: object
                        properties:
                          batch:
                            type: object
                            properties:
                              id:
                                type: string
                              task_name:
                                type: string
                              status:
                                type: string
                                enum:
                                  - pending
                                  - succeed
                                  - failed
                                  - partial_succeed
                                description: >-
                                  Aggregate status of a task batch. `pending` =
                                  at least one task is still running; `succeed`
                                  = all tasks succeeded; `failed` = all tasks
                                  failed, timed out, or were cancelled;
                                  `partial_succeed` = finished with a mix of
                                  success and failure.
                                example: succeed
                              task_params:
                                description: >-
                                  Task parameters (JSON). Structure varies by
                                  task_name.
                                additionalProperties: {}
                                type:
                                  - object
                                  - 'null'
                              created_by:
                                description: >-
                                  Represents an entity that performs actions in
                                  the system (user, API key, or system)
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - user
                                      - apikey
                                      - system
                                    description: The type of actor
                                    example: user
                                  id:
                                    type: string
                                    description: The unique identifier of the actor
                                    example: user_2xGz1234567890
                                  name:
                                    description: The display name of the actor
                                    example: John Doe
                                    type:
                                      - string
                                      - 'null'
                                  avatar:
                                    description: The avatar URL of the actor
                                    example: https://example.com/avatar.png
                                    type:
                                      - string
                                      - 'null'
                                  metadata:
                                    description: Additional metadata about the actor
                                    type: object
                                    additionalProperties: {}
                                required:
                                  - type
                                  - id
                                  - name
                                  - avatar
                                title: Actor
                                type:
                                  - object
                                  - 'null'
                              created_at:
                                type: string
                            required:
                              - id
                              - task_name
                              - status
                              - task_params
                              - created_by
                              - created_at
                          tasks:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                miner_id:
                                  type:
                                    - string
                                    - 'null'
                                status:
                                  type: string
                                  description: >-
                                    Task execution status. `created` = enqueued
                                    but not yet picked up by an agent; `queuing`
                                    = accepted by the agent and waiting in its
                                    local queue; `pending` = actively executing
                                    on the miner; `succeed` = finished
                                    successfully; `failed` = finished with an
                                    error; `timed_out` = exceeded its execution
                                    deadline; `cancelled` = aborted before
                                    completion.
                                  example: succeed
                                  enum:
                                    - created
                                    - queuing
                                    - pending
                                    - succeed
                                    - failed
                                    - timed_out
                                    - cancelled
                                created_at:
                                  type: string
                                succeed_at:
                                  type: string
                                failed_at:
                                  type: string
                                params:
                                  description: Task parameters (JSON)
                                  additionalProperties: {}
                                  type:
                                    - object
                                    - 'null'
                                log_download_url:
                                  type:
                                    - string
                                    - 'null'
                                log_file_size:
                                  type:
                                    - number
                                    - 'null'
                                error:
                                  type: object
                                  properties:
                                    message:
                                      type: string
                                  required:
                                    - message
                              required:
                                - id
                                - miner_id
                                - status
                                - created_at
                                - params
                                - log_download_url
                                - log_file_size
                        required:
                          - batch
                          - tasks
                      - type: object
                        properties:
                          batch:
                            type: object
                            properties:
                              id:
                                type: string
                              task_name:
                                type: string
                              status:
                                type: string
                                enum:
                                  - pending
                                  - succeed
                                  - failed
                                  - partial_succeed
                                description: >-
                                  Aggregate status of a task batch. `pending` =
                                  at least one task is still running; `succeed`
                                  = all tasks succeeded; `failed` = all tasks
                                  failed, timed out, or were cancelled;
                                  `partial_succeed` = finished with a mix of
                                  success and failure.
                                example: succeed
                              task_params:
                                description: >-
                                  Task parameters (JSON). Structure varies by
                                  task_name.
                                additionalProperties: {}
                                type:
                                  - object
                                  - 'null'
                              created_by:
                                description: >-
                                  Represents an entity that performs actions in
                                  the system (user, API key, or system)
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - user
                                      - apikey
                                      - system
                                    description: The type of actor
                                    example: user
                                  id:
                                    type: string
                                    description: The unique identifier of the actor
                                    example: user_2xGz1234567890
                                  name:
                                    description: The display name of the actor
                                    example: John Doe
                                    type:
                                      - string
                                      - 'null'
                                  avatar:
                                    description: The avatar URL of the actor
                                    example: https://example.com/avatar.png
                                    type:
                                      - string
                                      - 'null'
                                  metadata:
                                    description: Additional metadata about the actor
                                    type: object
                                    additionalProperties: {}
                                required:
                                  - type
                                  - id
                                  - name
                                  - avatar
                                title: Actor
                                type:
                                  - object
                                  - 'null'
                              created_at:
                                type: string
                            required:
                              - id
                              - task_name
                              - status
                              - task_params
                              - created_by
                              - created_at
                          tasks:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                miner_id:
                                  type:
                                    - string
                                    - 'null'
                                status:
                                  type: string
                                  description: >-
                                    Task execution status. `created` = enqueued
                                    but not yet picked up by an agent; `queuing`
                                    = accepted by the agent and waiting in its
                                    local queue; `pending` = actively executing
                                    on the miner; `succeed` = finished
                                    successfully; `failed` = finished with an
                                    error; `timed_out` = exceeded its execution
                                    deadline; `cancelled` = aborted before
                                    completion.
                                  example: succeed
                                  enum:
                                    - created
                                    - queuing
                                    - pending
                                    - succeed
                                    - failed
                                    - timed_out
                                    - cancelled
                                created_at:
                                  type: string
                                succeed_at:
                                  type: string
                                failed_at:
                                  type: string
                                params:
                                  description: Task parameters (JSON)
                                  additionalProperties: {}
                                  type:
                                    - object
                                    - 'null'
                                error:
                                  type: object
                                  properties:
                                    message:
                                      type: string
                                  required:
                                    - message
                              required:
                                - id
                                - miner_id
                                - status
                                - created_at
                                - params
                        required:
                          - batch
                          - tasks
                      - type: object
                        properties:
                          batch:
                            type: object
                            properties:
                              id:
                                type: string
                              task_name:
                                type: string
                              status:
                                type: string
                                enum:
                                  - pending
                                  - succeed
                                  - failed
                                  - partial_succeed
                                description: >-
                                  Aggregate status of a task batch. `pending` =
                                  at least one task is still running; `succeed`
                                  = all tasks succeeded; `failed` = all tasks
                                  failed, timed out, or were cancelled;
                                  `partial_succeed` = finished with a mix of
                                  success and failure.
                                example: succeed
                              task_params:
                                description: >-
                                  Task parameters (JSON). Structure varies by
                                  task_name.
                                additionalProperties: {}
                                type:
                                  - object
                                  - 'null'
                              created_by:
                                description: >-
                                  Represents an entity that performs actions in
                                  the system (user, API key, or system)
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - user
                                      - apikey
                                      - system
                                    description: The type of actor
                                    example: user
                                  id:
                                    type: string
                                    description: The unique identifier of the actor
                                    example: user_2xGz1234567890
                                  name:
                                    description: The display name of the actor
                                    example: John Doe
                                    type:
                                      - string
                                      - 'null'
                                  avatar:
                                    description: The avatar URL of the actor
                                    example: https://example.com/avatar.png
                                    type:
                                      - string
                                      - 'null'
                                  metadata:
                                    description: Additional metadata about the actor
                                    type: object
                                    additionalProperties: {}
                                required:
                                  - type
                                  - id
                                  - name
                                  - avatar
                                title: Actor
                                type:
                                  - object
                                  - 'null'
                              created_at:
                                type: string
                            required:
                              - id
                              - task_name
                              - status
                              - task_params
                              - created_by
                              - created_at
                          tasks:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                miner_id:
                                  type:
                                    - string
                                    - 'null'
                                status:
                                  type: string
                                  description: >-
                                    Task execution status. `created` = enqueued
                                    but not yet picked up by an agent; `queuing`
                                    = accepted by the agent and waiting in its
                                    local queue; `pending` = actively executing
                                    on the miner; `succeed` = finished
                                    successfully; `failed` = finished with an
                                    error; `timed_out` = exceeded its execution
                                    deadline; `cancelled` = aborted before
                                    completion.
                                  example: succeed
                                  enum:
                                    - created
                                    - queuing
                                    - pending
                                    - succeed
                                    - failed
                                    - timed_out
                                    - cancelled
                                created_at:
                                  type: string
                                succeed_at:
                                  type: string
                                failed_at:
                                  type: string
                                params:
                                  description: Task parameters (JSON)
                                  additionalProperties: {}
                                  type:
                                    - object
                                    - 'null'
                              required:
                                - id
                                - miner_id
                                - status
                                - created_at
                                - params
                        required:
                          - batch
                          - tasks
                  error:
                    type: 'null'
                    example: null
                    description: Error object (null on success)
                required:
                  - success
                  - data
                  - error
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 400
                  message:
                    type: string
                    description: Error message
                    example: Invalid request parameters
                  error:
                    type: string
                    description: Error type
                    example: Bad Request
                required:
                  - statusCode
                  - message
                  - error
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 401
                  message:
                    type: string
                    description: Error message
                    example: Invalid or missing API key
                  error:
                    type: string
                    description: Error type
                    example: Unauthorized
                required:
                  - statusCode
                  - message
                  - error
        '403':
          description: Forbidden - Valid API key but insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 403
                  message:
                    type: string
                    description: Error message
                    example: Access denied to workspace
                  error:
                    type: string
                    description: Error type
                    example: Forbidden
                required:
                  - statusCode
                  - message
                  - error
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    description: HTTP status code
                    example: 404
                  message:
                    type: string
                    description: Error message
                    example: Resource not found
                  error:
                    type: string
                    description: Error type
                    example: Not Found
                required:
                  - statusCode
                  - message
                  - error
      security:
        - clerk-api-key: []
components:
  securitySchemes:
    clerk-api-key:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: Clerk Machine API Key for authentication

````