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

# Search Miners

> Search miners in the farm with structured filters.



## OpenAPI

````yaml /api-reference/openapi-v2.json post /public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/miners/search
openapi: 3.1.0
info:
  title: Nonce Public API
  description: Nonce Public API
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.nonce.app
    description: Production server
security: []
tags: []
paths:
  /public-api/v2/workspaces/{workspace_id}/farms/{farm_id}/miners/search:
    post:
      tags:
        - Miners
      summary: Search Miners
      description: Search miners in the farm with structured filters.
      operationId: SearchMiners
      parameters:
        - name: workspace_id
          required: true
          in: path
          schema:
            type: string
        - name: farm_id
          required: true
          in: path
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicMinerSearchBodyDto'
      responses:
        '200':
          description: Miners matching the structured search criteria
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Miner ID
                        workspace_id:
                          type: string
                          description: Owning workspace ID
                        farm_id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          description: Owning farm ID
                        serial_number:
                          description: Hardware serial number
                          type:
                            - string
                            - 'null'
                        make:
                          type: string
                          description: Manufacturer
                        model:
                          description: Hardware model
                          type:
                            - string
                            - 'null'
                        ip:
                          type: string
                          description: Current IP address
                        mac:
                          description: MAC address
                          type:
                            - string
                            - 'null'
                        worker_name:
                          description: Primary pool worker name
                          type:
                            - string
                            - 'null'
                        rack:
                          description: Rack identifier
                          type:
                            - string
                            - 'null'
                        position:
                          description: Position within the rack
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          type:
                            - integer
                            - 'null'
                        is_mining:
                          type: boolean
                          description: Whether the miner is actively hashing
                        status:
                          type: string
                          enum:
                            - online
                            - stale
                          title: Miner Run Status
                          description: System-managed miner reporting status
                          examples:
                            - online
                        tags:
                          type: array
                          items:
                            type: string
                          description: Miner labels
                        mining_mode:
                          type: string
                          description: Current power or performance mode
                        mining_mode_preset:
                          description: Current third-party mode preset
                          type:
                            - string
                            - 'null'
                        hashrate:
                          description: Current hashrate in H/s
                          type:
                            - number
                            - 'null'
                        expected_hashrate:
                          description: Expected hashrate in H/s
                          type:
                            - number
                            - 'null'
                        power:
                          description: Current power consumption in watts
                          type:
                            - number
                            - 'null'
                        temperature:
                          description: Average board temperature in Celsius
                          type:
                            - number
                            - 'null'
                        efficiency:
                          description: Energy efficiency in J/TH
                          type:
                            - number
                            - 'null'
                        anomaly_flags:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: Current anomaly bitmask
                        uptime:
                          type: number
                          description: Uptime in seconds
                        last_updated_at:
                          description: Last heartbeat time
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - workspace_id
                        - farm_id
                        - serial_number
                        - make
                        - model
                        - ip
                        - mac
                        - worker_name
                        - rack
                        - position
                        - is_mining
                        - status
                        - tags
                        - mining_mode
                        - mining_mode_preset
                        - hashrate
                        - expected_hashrate
                        - power
                        - temperature
                        - efficiency
                        - anomaly_flags
                        - uptime
                        - last_updated_at
                      title: MinerSummary
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      page:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      page_size:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      total_pages:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - total
                      - page
                      - page_size
                      - total_pages
                  error:
                    type: 'null'
                    example: null
                required:
                  - success
                  - data
                  - pagination
                  - error
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: 'null'
                    example: null
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          field_errors:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: string
                                message:
                                  type: string
                              required:
                                - path
                                - message
                              additionalProperties: false
                        additionalProperties: {}
                      traceId:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                  - error
                additionalProperties: false
              example:
                success: false
                data: null
                error:
                  code: VALIDATION_ERROR
                  message: Validation failed
        '401':
          description: Unauthorized - Invalid or missing OAuth JWT or Workspace API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: 'null'
                    example: null
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          field_errors:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: string
                                message:
                                  type: string
                              required:
                                - path
                                - message
                              additionalProperties: false
                        additionalProperties: {}
                      traceId:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                  - error
                additionalProperties: false
              example:
                success: false
                data: null
                error:
                  code: UNAUTHORIZED
                  message: Invalid or missing credential
        '403':
          description: >-
            Forbidden - Credential does not grant access to the requested
            resource
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: 'null'
                    example: null
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          field_errors:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: string
                                message:
                                  type: string
                              required:
                                - path
                                - message
                              additionalProperties: false
                        additionalProperties: {}
                      traceId:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                  - error
                additionalProperties: false
              example:
                success: false
                data: null
                error:
                  code: FORBIDDEN
                  message: Access denied
        '404':
          description: Farm not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: 'null'
                    example: null
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          field_errors:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: string
                                message:
                                  type: string
                              required:
                                - path
                                - message
                              additionalProperties: false
                        additionalProperties: {}
                      traceId:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                  - error
                additionalProperties: false
              example:
                success: false
                data: null
                error:
                  code: FARM_NOT_FOUND
                  message: Farm not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: 'null'
                    example: null
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          field_errors:
                            type: array
                            items:
                              type: object
                              properties:
                                path:
                                  type: string
                                message:
                                  type: string
                              required:
                                - path
                                - message
                              additionalProperties: false
                        additionalProperties: {}
                      traceId:
                        type: string
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - data
                  - error
                additionalProperties: false
              example:
                success: false
                data: null
                error:
                  code: INTERNAL_SERVER_ERROR
                  message: Internal server error
      security:
        - oauth-jwt: []
        - clerk-api-key: []
components:
  schemas:
    PublicMinerSearchBodyDto:
      type: object
      properties:
        status:
          description: Filter by system-managed miner reporting status
          examples:
            - in:
                - online
          type: object
          properties:
            eq:
              type: string
              enum:
                - online
                - stale
              title: Miner Run Status
              description: System-managed miner reporting status
              examples:
                - online
            ne:
              type: string
              enum:
                - online
                - stale
              title: Miner Run Status
              description: System-managed miner reporting status
              examples:
                - online
            in:
              minItems: 1
              type: array
              items:
                type: string
                enum:
                  - online
                  - stale
                title: Miner Run Status
                description: System-managed miner reporting status
                examples:
                  - online
            nin:
              minItems: 1
              type: array
              items:
                type: string
                enum:
                  - online
                  - stale
                title: Miner Run Status
                description: System-managed miner reporting status
                examples:
                  - online
          additionalProperties: false
          minProperties: 1
        tags:
          description: Filter by exact operator-managed miner tags
          examples:
            - in:
                - maintenance
          type: object
          properties:
            eq:
              type: string
              minLength: 1
            ne:
              type: string
              minLength: 1
            in:
              minItems: 1
              type: array
              items:
                type: string
                minLength: 1
            nin:
              minItems: 1
              type: array
              items:
                type: string
                minLength: 1
          additionalProperties: false
          minProperties: 1
        mining_mode:
          description: Filter by exact raw mining mode values
          examples:
            - in:
                - sleep
          type: object
          properties:
            eq:
              type: string
              minLength: 1
            ne:
              type: string
              minLength: 1
            in:
              minItems: 1
              type: array
              items:
                type: string
                minLength: 1
            nin:
              minItems: 1
              type: array
              items:
                type: string
                minLength: 1
          additionalProperties: false
          minProperties: 1
        network_mode:
          description: >-
            Filter by network mode. `unknown` matches miners whose firmware does
            not report a mode or that have not been collected yet.
          examples:
            - in:
                - dhcp
                - unknown
          type: object
          properties:
            eq:
              type: string
              enum:
                - dhcp
                - static
                - unknown
            ne:
              type: string
              enum:
                - dhcp
                - static
                - unknown
            in:
              minItems: 1
              type: array
              items:
                type: string
                enum:
                  - dhcp
                  - static
                  - unknown
            nin:
              minItems: 1
              type: array
              items:
                type: string
                enum:
                  - dhcp
                  - static
                  - unknown
          additionalProperties: false
          minProperties: 1
        search:
          anyOf:
            - type: object
              properties:
                field:
                  type: string
                  enum:
                    - ip
                    - mac
                    - serial_number
                    - hostname
                    - model
                    - fw_ver
                    - firmware
                    - mining_mode
                    - rack
                    - worker_name
                    - tags
                  title: Miner Search Field
                  description: Field available for structured miner keyword search
                  examples:
                    - worker_name
                value:
                  type: string
                  minLength: 1
                  description: Value to match
                  examples:
                    - BVI07CMVP01
              required:
                - field
                - value
              title: Miner Field Search
              description: Structured search against one miner field
              examples:
                - field: worker_name
                  value: BVI07CMVP01
            - type: object
              properties:
                value:
                  type: string
                  minLength: 1
                  description: Keyword to match across all searchable fields
                  examples:
                    - S19
              required:
                - value
              title: Miner Global Search
              description: Keyword search across all searchable miner fields
              examples:
                - value: S19
          title: Miner Search
          description: >-
            Structured miner search: either a global keyword or a field-specific
            match
          examples:
            - value: S19
            - field: worker_name
              value: BVI07CMVP01
        sort:
          minItems: 1
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                enum:
                  - id
                  - created_at
                  - is_mining
                  - hashrate
                  - performance
                  - wattage
                  - temperature_avg
                  - efficiency
                  - uptime
                  - runtime
                  - serial_number
                  - model
                  - ip
                  - last_updated_at
                  - rack
                  - rack_location
                description: API sort field
                examples:
                  - hashrate
              direction:
                type: string
                enum:
                  - asc
                  - desc
                description: Sort direction
                examples:
                  - desc
            required:
              - field
              - direction
            title: Miner Sort
            description: One ordered miner sort clause
            examples:
              - field: hashrate
                direction: desc
          title: Miner Sort List
          description: Ordered miner sort clauses
          examples:
            - - field: hashrate
                direction: desc
        hashrate:
          description: Hashrate range in H/s
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
              minimum: 0
            lt:
              description: Exclusive upper bound
              type: number
              minimum: 0
          title: Nonnegative Numeric Range
          examples:
            - gt: 100
              lt: 500
          minProperties: 1
        power:
          description: Power range in watts
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
              minimum: 0
            lt:
              description: Exclusive upper bound
              type: number
              minimum: 0
          title: Nonnegative Numeric Range
          examples:
            - gt: 100
              lt: 500
          minProperties: 1
        temperature:
          description: Temperature range in celsius
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
            lt:
              description: Exclusive upper bound
              type: number
          title: Numeric Range
          examples:
            - gt: 100
              lt: 500
          minProperties: 1
        efficiency:
          description: Efficiency range in J/TH
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
              minimum: 0
            lt:
              description: Exclusive upper bound
              type: number
              minimum: 0
          title: Nonnegative Numeric Range
          examples:
            - gt: 100
              lt: 500
          minProperties: 1
        runtime:
          description: Runtime range in seconds
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
              minimum: 0
            lt:
              description: Exclusive upper bound
              type: number
              minimum: 0
          title: Nonnegative Numeric Range
          examples:
            - gt: 100
              lt: 500
          minProperties: 1
        hashrate_realization:
          description: Hashrate realization ratio range, where 0.8 means 80%
          examples:
            - lt: 0.8
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: number
              minimum: 0
            lt:
              description: Exclusive upper bound
              type: number
              minimum: 0
          title: Nonnegative Numeric Range
          minProperties: 1
        last_updated_at:
          description: Last report timestamp range
          examples:
            - gt: '2026-08-17T03:00:00.000Z'
          type: object
          properties:
            gt:
              description: Exclusive lower bound
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            lt:
              description: Exclusive upper bound
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
          title: Date Range
          minProperties: 1
        rack:
          description: Exact rack identifier
          type: string
          minLength: 1
        ip_ranges:
          maxItems: 10
          type: array
          items:
            type: string
            pattern: >-
              ^(?:(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)\/(?:3[0-2]|[12]?\d)|(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)-(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:(25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?))$
        anomaly_flags:
          description: >-
            Filter by anomaly type. Uses bitmask matching against the
            anomaly_flags field.
          examples:
            - in:
                - fan
                - power
          type: object
          properties:
            eq:
              type: string
              enum:
                - fan
                - power
                - temperature
                - hashboard
                - network
                - firmware
                - unknown
                - control_board
                - pool
                - low_hashrate
            ne:
              type: string
              enum:
                - fan
                - power
                - temperature
                - hashboard
                - network
                - firmware
                - unknown
                - control_board
                - pool
                - low_hashrate
            in:
              type: array
              items:
                type: string
                enum:
                  - fan
                  - power
                  - temperature
                  - hashboard
                  - network
                  - firmware
                  - unknown
                  - control_board
                  - pool
                  - low_hashrate
            nin:
              type: array
              items:
                type: string
                enum:
                  - fan
                  - power
                  - temperature
                  - hashboard
                  - network
                  - firmware
                  - unknown
                  - control_board
                  - pool
                  - low_hashrate
          additionalProperties: false
          example:
            in:
              - online
              - offline
        page:
          default: 1
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
        page_size:
          default: 20
          type: integer
          exclusiveMinimum: 0
          maximum: 10000
  securitySchemes:
    oauth-jwt:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Clerk OAuth JWT access token
    clerk-api-key:
      scheme: bearer
      bearerFormat: API Key
      type: http
      description: Workspace API key

````