> ## 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.

# Post apiv1vm execstreamattach



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/vm/{vm_id}/exec/stream/attach
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}/exec/stream/attach:
    post:
      tags:
        - vm
      operationId: exec_vm_stream_attach
      parameters:
        - name: vm_id
          in: path
          description: VM ID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VmExecStreamAttachRequest'
        required: true
      responses:
        '200':
          description: NDJSON stream replaying from cursor
        '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:
    VmExecStreamAttachRequest:
      type: object
      description: Request body for POST /api/vm/{vm_id}/exec/stream/attach
      required:
        - exec_id
      properties:
        cursor:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Optional cursor to resume from (exclusive). If omitted, the full
            retained backlog is replayed.
          minimum: 0
        exec_id:
          type: string
          format: uuid
          description: Identifier of the exec stream session to reattach to.
        from_latest:
          type:
            - boolean
            - 'null'
          description: Start streaming after the latest retained chunk (ignores cursor).
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````