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

# Get bounded VM metrics history



## OpenAPI

````yaml /openapi/control-plane-public.json get /api/v1/workspaces/{workspaceId}/virtual-machines/{vmId}/metrics/history
openapi: 3.1.0
info:
  title: AcornOps Control Plane API
  version: 0.0.1-experimental.1
  description: >-
    Control plane API for workspaces, targets, Kubernetes clusters, virtual
    machines, sessions, runs, auth, and internal execution wiring.
servers:
  - url: https://api.acornops.dev
security: []
tags:
  - name: health
    description: Health and readiness endpoints.
  - name: auth
    description: >-
      OIDC, password, browser session, and external integration account link
      endpoints.
  - name: workspaces
    description: Workspace, target, Kubernetes cluster, and VM management endpoints.
  - name: webhooks
    description: Best-effort webhook subscription and delivery history endpoints.
  - name: sessions
    description: Session and message endpoints.
  - name: runs
    description: Run query, cancel, and stream endpoints.
  - name: workflows
    description: >-
      Workspace workflow definitions, schedules, sessions, and approval inbox
      endpoints.
  - name: agents
    description: >-
      Workspace-scoped custom agent definitions, triggers, versions, tests, and
      activity.
  - name: admin
    description: Operator-only admin API protected exclusively by admin bearer tokens.
  - name: internal
    description: Internal execution endpoints for execution-engine.
paths:
  /api/v1/workspaces/{workspaceId}/virtual-machines/{vmId}/metrics/history:
    get:
      tags:
        - workspaces
      summary: Get bounded VM metrics history
      parameters:
        - in: path
          name: workspaceId
          required: true
          schema:
            type: string
            format: uuid
            example: 4b930d98-add9-4924-ab26-3c16d96ec373
        - in: path
          name: vmId
          required: true
          schema:
            type: string
            format: uuid
            example: 9254df42-4d9b-4e63-8bb6-93442e7d9a45
        - in: query
          name: window
          required: false
          schema:
            type: string
            example: 1h
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 288
            example: 48
      responses:
        '200':
          description: >-
            VM load, memory, swap, and root disk history payload: { workspaceId,
            targetId, windowMs, points }.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualMachineMetricHistory'
        '400':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - userSession: []
components:
  schemas:
    VirtualMachineMetricHistory:
      type: object
      required:
        - workspaceId
        - targetId
        - windowMs
        - points
      properties:
        workspaceId:
          type: string
          format: uuid
        targetId:
          type: string
          format: uuid
        windowMs:
          type: integer
          minimum: 0
        points:
          type: array
          items:
            $ref: '#/components/schemas/VirtualMachineMetricHistoryPoint'
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: object
              additionalProperties: true
              description: Optional structured error details.
    VirtualMachineMetricHistoryPoint:
      type: object
      required:
        - timestamp
        - loadAverage1m
        - loadAverage5m
        - loadAverage15m
        - cpuUsagePercent
        - memoryUsedBytes
        - memoryTotalBytes
        - memoryFreeBytes
        - memoryUsedPercent
        - swapUsedBytes
        - swapTotalBytes
        - swapUsedPercent
        - rootDiskUsedBytes
        - rootDiskTotalBytes
        - rootDiskUsedPercent
      properties:
        timestamp:
          type: string
          format: date-time
        loadAverage1m:
          type: number
          minimum: 0
          nullable: true
        loadAverage5m:
          type: number
          minimum: 0
          nullable: true
        loadAverage15m:
          type: number
          minimum: 0
          nullable: true
        cpuUsagePercent:
          type: number
          minimum: 0
          maximum: 100
          nullable: true
        memoryUsedBytes:
          type: number
          minimum: 0
          nullable: true
        memoryTotalBytes:
          type: number
          minimum: 0
          nullable: true
        memoryFreeBytes:
          type: number
          minimum: 0
          nullable: true
        memoryUsedPercent:
          type: number
          minimum: 0
          maximum: 100
          nullable: true
        swapUsedBytes:
          type: number
          minimum: 0
          nullable: true
        swapTotalBytes:
          type: number
          minimum: 0
          nullable: true
        swapUsedPercent:
          type: number
          minimum: 0
          maximum: 100
          nullable: true
        rootDiskUsedBytes:
          type: number
          minimum: 0
          nullable: true
        rootDiskTotalBytes:
          type: number
          minimum: 0
          nullable: true
        rootDiskUsedPercent:
          type: number
          minimum: 0
          maximum: 100
          nullable: true
      additionalProperties: false
  securitySchemes:
    userSession:
      type: apiKey
      in: cookie
      name: acornops_cp_session

````