Windmill worker API

The worker API from Windmill — 9 operation(s) for worker.

OpenAPI Specification

windmill-worker-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 1.694.0
  title: Windmill admin worker API
  contact:
    name: Windmill Team
    email: contact@windmill.dev
    url: https://windmill.dev
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-logo:
    url: https://windmill.dev/img/windmill.svg
servers:
- url: /api
security:
- bearerAuth: []
- cookieAuth: []
tags:
- name: worker
paths:
  /workers/custom_tags:
    get:
      summary: Get All Instance Custom Tags (tags are Used to Dispatch Jobs to different worker groups)
      operationId: getCustomTags
      tags:
      - worker
      parameters:
      - name: show_workspace_restriction
        in: query
        schema:
          type: boolean
        required: false
      responses:
        '200':
          description: list of custom tags
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /w/{workspace}/workers/custom_tags:
    get:
      summary: Get Custom Tags Available for this Workspace
      operationId: getCustomTagsForWorkspace
      tags:
      - worker
      parameters:
      - $ref: '#/components/parameters/WorkspaceId'
      responses:
        '200':
          description: list of custom tags for workspace
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /workers/get_default_tags:
    get:
      summary: Get All Instance Default Tags
      operationId: geDefaultTags
      tags:
      - worker
      responses:
        '200':
          description: list of default tags
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /workers/is_default_tags_per_workspace:
    get:
      summary: Is Default Tags Per Workspace
      operationId: isDefaultTagsPerWorkspace
      tags:
      - worker
      responses:
        '200':
          description: is the default tags per workspace
          content:
            application/json:
              schema:
                type: boolean
  /workers/list:
    get:
      summary: List Workers
      operationId: listWorkers
      x-mcp-tool: true
      tags:
      - worker
      parameters:
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - name: ping_since
        in: query
        required: false
        description: number of seconds the worker must have had a last ping more recent of (default to 300)
        schema:
          type: integer
      responses:
        '200':
          description: a list of workers
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WorkerPing'
  /workers/exists_workers_with_tags:
    get:
      summary: Exists Workers with Tags
      operationId: existsWorkersWithTags
      tags:
      - worker
      parameters:
      - name: tags
        in: query
        required: true
        description: comma separated list of tags
        schema:
          type: string
      - name: workspace
        in: query
        required: false
        description: workspace to filter tags visibility (required when TAGS_ARE_SENSITIVE is enabled for non-superadmins)
        schema:
          type: string
      responses:
        '200':
          description: map of tags to whether at least one worker with the tag exists
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: boolean
  /workers/queue_metrics:
    get:
      summary: Get Queue Metrics
      operationId: getQueueMetrics
      tags:
      - worker
      responses:
        '200':
          description: metrics
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    values:
                      type: array
                      items:
                        type: object
                        properties:
                          created_at:
                            type: string
                          value:
                            type: number
                        required:
                        - created_at
                        - value
                  required:
                  - id
                  - values
  /workers/queue_counts:
    get:
      summary: Get Counts of Jobs Waiting for an Executor Per Tag
      operationId: getCountsOfJobsWaitingPerTag
      tags:
      - worker
      responses:
        '200':
          description: queue counts
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
  /workers/queue_running_counts:
    get:
      summary: Get Counts of Currently Running Jobs Per Tag
      operationId: getCountsOfRunningJobsPerTag
      tags:
      - worker
      responses:
        '200':
          description: queue running counts
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: integer
components:
  parameters:
    WorkspaceId:
      name: workspace
      in: path
      required: true
      schema:
        type: string
    PerPage:
      name: per_page
      description: number of items to return for a given page (default 30, max 100)
      in: query
      schema:
        type: integer
    Page:
      name: page
      description: which page to return (start at 1, default 1)
      in: query
      schema:
        type: integer
  schemas:
    WorkerPing:
      type: object
      properties:
        worker:
          type: string
        worker_instance:
          type: string
        last_ping:
          type: number
        started_at:
          type: string
          format: date-time
        ip:
          type: string
        jobs_executed:
          type: integer
        custom_tags:
          type: array
          items:
            type: string
        worker_group:
          type: string
        wm_version:
          type: string
        last_job_id:
          type: string
        last_job_workspace_id:
          type: string
        occupancy_rate:
          type: number
        occupancy_rate_15s:
          type: number
        occupancy_rate_5m:
          type: number
        occupancy_rate_30m:
          type: number
        memory:
          type: number
        vcpus:
          type: number
        memory_usage:
          type: number
        wm_memory_usage:
          type: number
        job_isolation:
          type: string
        native_mode:
          type: boolean
      required:
      - worker
      - worker_instance
      - ping_at
      - started_at
      - ip
      - jobs_executed
      - worker_group
      - wm_version
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: token
externalDocs:
  description: documentation portal
  url: https://windmill.dev