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

# List Miner Tasks

> Returns task history for a specific miner



## OpenAPI

````yaml /api-reference/openapi.json get /private-api/v1/{workspace_id}/farms/{farm_id}/miners/{miner_id}/tasks
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}/miners/{miner_id}/tasks:
    get:
      tags:
        - Private API
        - Miner
      summary: List Miner Tasks
      description: Returns task history for a specific miner
      operationId: GetMinerTasks
      parameters:
        - name: workspace_id
          required: true
          in: path
          schema:
            type: string
        - name: farm_id
          required: true
          in: path
          schema:
            type: string
        - name: miner_id
          required: true
          in: path
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: 'Page number (default: 1)'
          schema:
            minimum: 1
            example: 1
            type: number
        - name: pageSize
          required: false
          in: query
          description: 'Number of items per page (default: 10, max: 10000)'
          schema:
            minimum: 1
            maximum: 10000
            example: 10
            type: number
        - name: task_name
          required: false
          in: query
          description: Miner task name
          schema:
            enum:
              - agent.scan.create
              - agent.ip_diagnosis.create
              - agent.self.update
              - miner.system.reboot
              - miner.log.get
              - miner.light.update
              - miner.power_mode.update
              - miner.pool.update
              - miner.pool.lock
              - miner.firmware.update
              - miner.asset.update
              - miner.asset.delete
              - miner.rack_location.update
            type: string
        - name: status
          required: false
          in: query
          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.
          schema:
            enum:
              - created
              - queuing
              - pending
              - succeed
              - failed
              - timed_out
              - cancelled
            type: string
        - name: from_time
          required: false
          in: query
          description: >-
            Start time for task history in ISO 8601 format with timezone offset.
            Must be within the last 7 days. Defaults to 7 days ago if not
            provided
          schema:
            format: datetime
            example: YYYY-MM-DDTHH:MM:SSZ
            type: string
        - name: to_time
          required: false
          in: query
          description: >-
            End time for task history in ISO 8601 format with timezone offset.
            Must be within the last 7 days. Defaults to now if not provided
          schema:
            format: datetime
            example: YYYY-MM-DDTHH:MM:SSZ
            type: string
      responses:
        '200':
          description: Successfully retrieved miner tasks
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    description: Indicates if the request was successful
                  data:
                    type: array
                    description: Array of items
                    items:
                      type: object
                      properties:
                        task_id:
                          type: string
                          description: Miner task ID
                          example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                        batch_id:
                          type: string
                          description: Miner task batch ID
                          example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                        task_name:
                          type: string
                          description: Miner task name
                          example: miner.log.get
                          enum:
                            - agent.scan.create
                            - agent.ip_diagnosis.create
                            - agent.self.update
                            - miner.system.reboot
                            - miner.log.get
                            - miner.light.update
                            - miner.power_mode.update
                            - miner.pool.update
                            - miner.pool.lock
                            - miner.firmware.update
                            - miner.asset.update
                            - miner.asset.delete
                            - miner.rack_location.update
                        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
                        params:
                          description: Task parameters (JSON)
                          additionalProperties: {}
                          type:
                            - object
                            - 'null'
                        error:
                          description: Error details if task failed (JSON)
                          additionalProperties: {}
                          type:
                            - object
                            - 'null'
                        result:
                          description: Task execution result (JSON)
                          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
                          format: datetime
                          example: YYYY-MM-DDTHH:MM:SSZ
                          description: >-
                            This is a timestamp in ISO 8601 format:
                            YYYY-MM-DDTHH:MM:SSZ.
                        updated_at:
                          type: string
                          format: datetime
                          example: YYYY-MM-DDTHH:MM:SSZ
                          description: >-
                            This is a timestamp in ISO 8601 format:
                            YYYY-MM-DDTHH:MM:SSZ.
                      required:
                        - task_id
                        - batch_id
                        - task_name
                        - status
                        - params
                        - error
                        - result
                        - created_by
                        - created_at
                        - updated_at
                      title: Miner Task
                      description: A task execution record for a single miner
                  pagination:
                    type: object
                    description: Pagination metadata
                    properties:
                      total:
                        type: number
                        example: 50
                        description: Total number of items
                      limit:
                        type: number
                        example: 10
                        description: Maximum number of items per page
                      offset:
                        type: number
                        example: 0
                        description: Number of items to skip
                      hasNext:
                        type: boolean
                        example: true
                        description: Whether there are more items after this page
                      hasPrevious:
                        type: boolean
                        example: false
                        description: Whether there are items before this page
                    required:
                      - total
                      - limit
                      - offset
                      - hasNext
                      - hasPrevious
                  error:
                    type: 'null'
                    example: null
                    description: Error object (null on success)
                required:
                  - success
                  - data
                  - pagination
                  - 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
      security:
        - clerk-api-key: []
components:
  securitySchemes:
    clerk-api-key:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: Clerk Machine API Key for authentication

````