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

# Drain Runner



## OpenAPI

````yaml POST /runners/{runner_id}/drain
openapi: 3.1.0
info:
  title: Tetryx Lynx Coordinator API
  description: HTTP API for Lynx job submission, batch inspection, and runner coordination.
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /runners/{runner_id}/drain:
    post:
      tags:
        - runners
      operationId: drain_runner
      parameters:
        - name: runner_id
          in: path
          description: Runner identifier
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Drain a runner from new work
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runner'
        '404':
          description: Runner not found
components:
  schemas:
    Runner:
      type: object
      required:
        - id
        - name
        - tags
        - capabilities
        - status
        - registered_at
        - last_heartbeat
        - current_jobs
        - total_jobs_completed
        - total_jobs_failed
      properties:
        accepting_jobs:
          type: boolean
        capabilities:
          $ref: '#/components/schemas/RunnerCapabilities'
        current_jobs:
          type: array
          items:
            type: string
            format: uuid
        drain_reason:
          type:
            - string
            - 'null'
        id:
          type: string
        last_heartbeat:
          type: string
          format: date-time
        name:
          type: string
        registered_at:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/RunnerStatus'
        tags:
          type: array
          items:
            type: string
        total_jobs_completed:
          type: integer
          format: int64
          minimum: 0
        total_jobs_failed:
          type: integer
          format: int64
          minimum: 0
    RunnerCapabilities:
      type: object
      required:
        - max_concurrent_jobs
        - supported_simulation_types
        - gpu_available
        - memory_gb
        - cpu_cores
      properties:
        cpu_cores:
          type: integer
          format: int32
          minimum: 0
        gpu_available:
          type: boolean
        max_concurrent_jobs:
          type: integer
          format: int32
          minimum: 0
        memory_gb:
          type: number
          format: double
        python_version:
          type:
            - string
            - 'null'
        supported_simulation_types:
          type: array
          items:
            type: string
    RunnerStatus:
      type: string
      enum:
        - Idle
        - Busy
        - Offline
        - Maintenance

````