Veeam Instances API

The Instances API from Veeam — 6 operation(s) for instances.

OpenAPI Specification

veeam-instances-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0-rev0
  title: Veeam Backup for AWS public API 1.0 Agents Instances API
  description: The Agents section defines paths and operations for managing recovery tokens used for bare metal recovery.
security:
- Bearer: []
tags:
- name: Instances
paths:
  /api/v1/virtualMachines:
    get:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: VirtualMachines
      parameters:
      - name: SearchPattern
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        schema:
          type: string
      - name: Offset
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        schema:
          type: integer
          format: int32
      - name: Limit
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        schema:
          type: integer
          format: int32
      - name: Sort
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        style: form
        explode: false
        schema:
          type: array
          items:
            type: string
            enum:
            - nameAsc
            - nameDesc
            - locationAsc
            - locationDesc
      - name: ProtectionStatus
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - Protected
            - Unprotected
          uniqueItems: false
      - name: BuckupDestination
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - Snapshot
            - AwsBlob
            - ManualSnapshot
          uniqueItems: false
      - name: BackupState
        in: query
        required: false
        x-veeam-spec:
          $ref: '#/components/schemas/VirtualMachinesFilters'
        schema:
          type: string
          enum:
          - OnlyBackedUp
          - OnlyNotBackedUp
          - All
      - $ref: '#/components/parameters/apiVersionParam'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualMachinesPage'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/VirtualMachinesPage'
        '400':
          description: Bad Request. The request body is malformed, incomplete or otherwise invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/virtualMachines/{virtualMachineId}:
    get:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: VirtualMachineById
      parameters:
      - name: virtualMachineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/apiVersionParam'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualMachine'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/VirtualMachine'
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found. One or more resources specified in the request could not be found in the specified resource collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/virtualMachines/{virtualMachineId}/takeSnapshot:
    post:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: TakeSnapshot
      parameters:
      - name: virtualMachineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/apiVersionParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VirtualMachineSnapshotSpec'
        required: true
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionLink'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/SessionLink'
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found. One or more resources specified in the request could not be found in the specified resource collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/virtualMachines/{virtualMachineId}/deleteSnapshots:
    post:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: DeleteVirtualMachineSnapshots
      parameters:
      - name: virtualMachineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/apiVersionParam'
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionLink'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/SessionLink'
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found. One or more resources specified in the request could not be found in the specified resource collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/virtualMachines/{virtualMachineId}/deleteBackups:
    post:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: DeleteVirtualMachineBackups
      parameters:
      - name: virtualMachineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/apiVersionParam'
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionLink'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/SessionLink'
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found. One or more resources specified in the request could not be found in the specified resource collection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/v1/virtualMachines/export:
    post:
      x-veeam-authorize:
        roles:
        - Portal Administrator
        - Portal Operator
      tags:
      - Instances
      operationId: ExportVirtualMachines
      parameters:
      - $ref: '#/components/parameters/apiVersionParam'
      responses:
        '200':
          description: Success
          content:
            text/csv:
              schema:
                type: string
                format: binary
            application/xml:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized. The authorization header has been expected but not found (or found but is expired).
          content:
            text/csv:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error. The request has been received but could not be completed because of an internal error at the server side.
          content:
            text/csv:
              schema:
                $ref: '#/components/schemas/Error'
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Link:
      required:
      - rel
      - href
      - method
      type: object
      properties:
        rel:
          type: string
        href:
          type: string
        method:
          type: string
          enum:
          - GET
          - POST
          - PUT
          - DELETE
    BackupDestinations:
      type: string
      enum:
      - Snapshot
      - AwsBlob
      - ManualSnapshot
    VirtualMachineProtectionStatuses:
      type: string
      enum:
      - Protected
      - Unprotected
    VirtualMachinesSortColumns:
      type: string
      enum:
      - nameAsc
      - nameDesc
      - locationAsc
      - locationDesc
    VirtualMachineSnapshotSpec:
      required:
      - amazonAccountId
      type: object
      properties:
        amazonAccountId:
          type: string
          format: uuid
        targetAmazonAccountIdToCopySnapshots:
          format: uuid
          type: string
        targetRegionIdToCopySnapshots:
          format: uuid
          type: string
        encryptionKey:
          type: string
        additionalTags:
          uniqueItems: false
          type: array
          items:
            $ref: '#/components/schemas/TagSpec'
        copyTagsFromVolumeEnabled:
          type: boolean
    VirtualMachinesPage:
      required:
      - results
      - totalCount
      type: object
      properties:
        results:
          uniqueItems: false
          type: array
          items:
            $ref: '#/components/schemas/VirtualMachine'
        totalCount:
          format: int32
          type: integer
        _links:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/Link'
    TagSpec:
      required:
      - key
      - value
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    VirtualMachine:
      required:
      - id
      - awsResourceId
      - protectionStatus
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        awsResourceId:
          type: string
        protectionStatus:
          $ref: '#/components/schemas/VirtualMachineProtectionStatuses'
        backupDestinations:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/BackupDestinations'
        location:
          required:
          - id
          - name
          type: object
          properties:
            name:
              type: string
            id:
              type: string
              format: uuid
        isDeleted:
          type: boolean
        _links:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/Link'
    VirtualMachinesFilters:
      type: object
      properties:
        SearchPattern:
          type: string
        ProtectionStatus:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/VirtualMachineProtectionStatuses'
        BackupDestination:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/BackupDestinations'
        BackupState:
          type: string
          enum:
          - OnlyBackedUp
          - OnlyNotBackedUp
          - All
        Offset:
          type: integer
          format: int32
          minimum: 0
        Limit:
          type: integer
          format: int32
          minimum: -1
        Sort:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/VirtualMachinesSortColumns'
    SessionLink:
      required:
      - sessionId
      type: object
      properties:
        sessionId:
          type: string
          format: uuid
        _links:
          type: array
          uniqueItems: false
          items:
            $ref: '#/components/schemas/Link'
    Error:
      description: ''
      required:
      - type
      - title
      - status
      - errorCode
      type: object
      properties:
        type:
          type: string
          format: uri
          description: An URI reference that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g. using HTML).
        title:
          type: string
          description: A short, summary of the problem type. Written in English and readable for engineers (usually not suited for non technical stakeholders and not localized)
        status:
          type: integer
          format: int32
          description: The HTTP status code generated by the origin server for this occurrence of the problem.
          minimum: 400
          maximum: 600
          exclusiveMaximum: true
        errorCode:
          description: The error code is a string that uniquely identifies an error condition and should be understood by programs that detect and handle errors by type
          enum:
          - AccessDenied
          - ExpiredToken
          - InvalidToken
          - InvalidURI
          - MethodNotAllowed
          - NotFound
          - NotImplemented
          - ServiceUnavailable
          - UnexpectedContent
          - UnknownError
          type: string
        details:
          description: The error message contains a generic description of the error condition in English. It is intended for a human audience
          type: string
        instance:
          description: ID of the object that is involved in the error (or empty)
          type: string
          format: uri
        data:
          type: object
          description: Error payload
          additionalProperties:
            type: object
  parameters:
    apiVersionParam:
      name: x-api-version
      in: header
      required: true
      schema:
        type: string
        default: 1.0-rev0
  securitySchemes:
    Bearer:
      name: Authorization
      in: header
      type: apiKey
      description: Bearer \<JWT\>