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

# Get apiv1vm logs



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/vm/{vm_id}/logs
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/{vm_id}/logs:
    get:
      tags:
        - vm
      operationId: vm_logs
      parameters:
        - name: vm_id
          in: path
          description: VM ID
          required: true
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          description: 'Byte offset into the log file (default: 0)'
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: max_entries
          in: query
          description: Maximum number of log entries to return
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: stream
          in: query
          description: Filter by 'stdout' or 'stderr'
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Exec logs retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VmExecLogResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: VM not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    VmExecLogResponse:
      type: object
      description: Response for exec log tail requests.
      required:
        - entries
        - next_offset
        - eof
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/VmExecLogEntry'
          description: Returned log entries.
        eof:
          type: boolean
          description: True when the end of file was reached.
        next_offset:
          type: integer
          format: int64
          description: Next byte offset to continue from.
          minimum: 0
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
    VmExecLogEntry:
      type: object
      description: Individual log entry describing emitted stdout/stderr chunk.
      required:
        - timestamp
        - stream
        - data_b64
      properties:
        data_b64:
          type: string
          description: Base64-encoded bytes from stdout/stderr chunk.
        exec_id:
          type:
            - string
            - 'null'
          format: uuid
        stream:
          $ref: '#/components/schemas/VmExecLogStream'
        timestamp:
          type: string
    VmExecLogStream:
      type: string
      description: Streams available for exec logging.
      enum:
        - stdout
        - stderr
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````