> ## 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 apiv1vmfrom commit



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/vm/from_commit
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/from_commit:
    post:
      tags:
        - vm
      operationId: restore_from_commit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FromCommitVmRequest'
        required: true
      responses:
        '201':
          description: VM restored from commit successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Cluster 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:
    FromCommitVmRequest:
      oneOf:
        - type: object
          description: The commit ID to restore from
          required:
            - commit_id
          properties:
            commit_id:
              type: string
              format: uuid
              description: The commit ID to restore from
        - type: object
          description: The tag name to restore from (legacy org-scoped tag)
          required:
            - tag_name
          properties:
            tag_name:
              type: string
              description: The tag name to restore from (legacy org-scoped tag)
        - type: object
          description: A repository reference in "repo_name:tag_name" format
          required:
            - ref
          properties:
            ref:
              type: string
              description: A repository reference in "repo_name:tag_name" format
      description: Request body for POST /api/v1/vm/from_commit
    NewVmResponse:
      type: object
      description: Response body for new VM requests (new_root, from_commit, branch)
      required:
        - vm_id
      properties:
        vm_id:
          type: string
    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

````