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

# Get server capacity

> Get server capacity through the Towbar REST API.

Required permissions: server.read. Personal keys are capped by their owner’s current team role.

See [request conventions](/docs/api/overview) and [automation workflows](/docs/api/workflows). MCP clients use the task-oriented [tool catalogue](/docs/api/mcp-tools).


## OpenAPI

````yaml api-reference/openapi.json GET /servers/{serverId}/capacity
openapi: 3.1.0
info:
  title: Towbar API
  version: 2.0.0
  description: >-
    Manage your Towbar control plane with a bearer API key. Keys inherit current
    workspace permissions.
servers:
  - url: https://api.example.com/v1/api
security: []
paths:
  /servers/{serverId}/capacity:
    get:
      tags:
        - Servers / Capacity
      summary: Get server capacity
      description: >-
        Required permissions: server.read. Personal keys are capped by the
        current member role; team keys use explicit grants.
      operationId: get_servers_by_id_capacity
      parameters:
        - name: serverId
          in: path
          required: true
          schema:
            $schema: https://json-schema.org/draft/2020-12/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)$
      responses:
        '200':
          description: JSON object containing capacity.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response_309'
                  - type: object
                    properties:
                      localization:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        type: object
                        properties:
                          dateFormat:
                            type: string
                            enum:
                              - day-short-month-year
                              - short-month-day-year
                              - year-month-day
                              - day-month-year
                              - month-day-year
                          timeFormat:
                            type: string
                            enum:
                              - 24-hour
                              - 12-hour
                              - 24-hour-seconds
                              - 12-hour-seconds
                          timeZone:
                            type: string
                          timestamps:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: object
                              properties:
                                date:
                                  type: string
                                time:
                                  type:
                                    - string
                                    - 'null'
                                dateTime:
                                  type:
                                    - string
                                    - 'null'
                                timeZone:
                                  type: string
                                zoneLabel:
                                  type: string
                                epochMilliseconds:
                                  type: number
                                inputDateTime:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - date
                                - time
                                - dateTime
                                - timeZone
                                - zoneLabel
                                - epochMilliseconds
                                - inputDateTime
                              additionalProperties: false
                        required:
                          - dateFormat
                          - timeFormat
                          - timeZone
                          - timestamps
                        additionalProperties: false
                    required:
                      - localization
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '404':
          $ref: '#/components/responses/ApiError'
        '409':
          $ref: '#/components/responses/ApiError'
        '413':
          $ref: '#/components/responses/ApiError'
        '422':
          $ref: '#/components/responses/ApiError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    Response_309:
      type: object
      properties:
        capacity:
          $ref: '#/components/schemas/RuntimeCapacity_310'
      required:
        - capacity
    RuntimeCapacity_310:
      type: object
      properties:
        checkedAt:
          anyOf:
            - type: 'null'
            - type: string
        cpu:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_311'
        disk:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_312'
        id:
          type: string
        ip:
          type: string
        latestCheckStatus:
          anyOf:
            - type: 'null'
            - type: string
              const: running
            - type: string
              const: queued
            - type: string
              const: succeeded
            - type: string
              const: failed
        memory:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_313'
        runtimes:
          type: array
          items:
            $ref: '#/components/schemas/Response_314'
        status:
          anyOf:
            - type: string
              const: unknown
            - type: string
              const: healthy
            - type: string
              const: critical
            - type: string
              const: attention
        uptimeSeconds:
          anyOf:
            - type: 'null'
            - type: number
      required:
        - checkedAt
        - cpu
        - disk
        - id
        - ip
        - latestCheckStatus
        - memory
        - runtimes
        - status
        - uptimeSeconds
    Response_311:
      type: object
      properties:
        logicalCount:
          type: number
        loadAverage1m:
          type: number
        usagePercent:
          type: number
      required:
        - logicalCount
        - loadAverage1m
        - usagePercent
    Response_312:
      type: object
      properties:
        availableBytes:
          type: number
        totalBytes:
          type: number
        usedPercent:
          type: number
      required:
        - availableBytes
        - totalBytes
        - usedPercent
    Response_313:
      type: object
      properties:
        availableBytes:
          type: number
        totalBytes:
          type: number
        usedPercent:
          type: number
      required:
        - availableBytes
        - totalBytes
        - usedPercent
    Response_314:
      type: object
      properties:
        cpuPercent:
          anyOf:
            - type: 'null'
            - type: number
        healthStatus:
          anyOf:
            - type: string
              const: unknown
            - type: string
              const: none
            - type: string
              const: healthy
            - type: string
              const: unhealthy
            - type: string
              const: starting
        id:
          type: string
        kind:
          anyOf:
            - type: string
              const: app
            - type: string
              const: compose
            - type: string
              const: image
            - type: string
              const: postgres
            - type: string
              const: mysql
            - type: string
              const: mariadb
            - type: string
              const: mongodb
            - type: string
              const: redis
            - type: string
              const: dragonfly
            - type: string
              const: keydb
            - type: string
              const: clickhouse
        memoryLimitBytes:
          anyOf:
            - type: 'null'
            - type: number
        memoryUsageBytes:
          anyOf:
            - type: 'null'
            - type: number
        name:
          type: string
        observedState:
          anyOf:
            - type: string
              const: unknown
            - type: string
              const: running
            - type: string
              const: missing
            - type: string
              const: stopped
        restartCount:
          anyOf:
            - type: 'null'
            - type: number
        sourceId:
          type: string
        startedAt:
          anyOf:
            - type: 'null'
            - type: string
      required:
        - cpuPercent
        - healthStatus
        - id
        - kind
        - memoryLimitBytes
        - memoryUsageBytes
        - name
        - observedState
        - restartCount
        - sourceId
        - startedAt
  responses:
    ApiError:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
    RateLimited:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
      headers:
        Retry-After:
          description: Seconds before retrying
          schema:
            type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Towbar API key

````