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

# Get all workers with pagination and sorting.

> Fetches a paginated list of all active security assessment workers in the cluster.



## OpenAPI

````yaml /api-reference/openapi.json get /api/workers
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/workers:
    get:
      tags:
        - Workers
      summary: Get all workers with pagination and sorting.
      description: >-
        Fetches a paginated list of all active security assessment workers in
        the cluster.
      operationId: WorkersController_getWorkers
      parameters:
        - name: search
          required: false
          in: query
          schema:
            type: string
        - name: page
          required: false
          in: query
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          schema:
            example: 10
            type: number
        - name: sortBy
          required: false
          in: query
          schema:
            example: createdAt
            type: string
        - name: sortOrder
          required: false
          in: query
          schema:
            example: DESC
            type: string
        - name: workspaceId
          required: false
          in: query
          schema:
            type: string
        - name: scope
          required: false
          in: query
          schema:
            type: string
            enum:
              - cloud
              - workspace
        - name: enabledAgentMode
          required: false
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetManyWorkerInstanceDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    GetManyWorkerInstanceDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkerInstance'
        total:
          type: number
        page:
          type: number
        limit:
          type: number
        hasNextPage:
          type: boolean
        pageCount:
          type: number
      required:
        - data
        - total
        - page
        - limit
        - hasNextPage
        - pageCount
    WorkerInstance:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        lastSeenAt:
          format: date-time
          type: string
        token:
          type: string
        name:
          type: string
        os:
          type: string
        ipAddress:
          type: string
        currentJobsCount:
          type: number
        type:
          type: string
          enum:
            - built_in
            - provider
        scope:
          type: string
          enum:
            - cloud
            - workspace
        tool:
          $ref: '#/components/schemas/Tool'
        internalNetworkId:
          type: string
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
        enabledAgentMode:
          type: boolean
        isOnline:
          type: boolean
      required:
        - id
        - createdAt
        - updatedAt
        - lastSeenAt
        - token
        - currentJobsCount
        - type
        - scope
        - tool
        - internalNetworkId
        - tools
    Tool:
      type: object
      properties:
        id:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        name:
          type: string
        description:
          type: string
        command:
          type: string
        category:
          type: string
          enum:
            - subdomains
            - http_probe
            - ports_scanner
            - vulnerabilities
            - screenshot
            - classifier
            - assistant
        version:
          type: string
        logoUrl:
          type: string
          nullable: true
        isBuiltIn:
          type: boolean
        isInstalled:
          type: boolean
        isOfficialSupport:
          type: boolean
        type:
          type: string
          enum:
            - built_in
            - provider
        providerId:
          type: string
        availableWorkersCount:
          type: number
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - description
        - command
        - category
        - version
        - isBuiltIn
        - isInstalled
        - isOfficialSupport
        - type
        - providerId

````