openapi: 3.0.0
info:
  version: "v1beta"
  title: SODA API
  description: Unified SODA API for data management across multiple, heterogeneous storage backends. Currently supporting file/block for on prem
  termsOfService: 'https://www.linuxfoundation.org/terms'
  contact:
    name: SODA Support
    url: 'https://sodafoundation.io/slack'
    email: support@sodafoundation.io
  license:
    name: Apache 2.0
    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
paths:
  /:
    get:
      tags:
        - API versions
      description: Lists information for all API versions.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  versions:
                    type: array
                    items:
                      $ref: '#/components/schemas/VersionSpec'
              examples:
                response:
                  value:
                    - name: v1beta
                      status: CURRENT
                      updated: '2017-07-10T14:36:58.014Z'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/{apiVersion}':
    parameters:
      - $ref: '#/components/parameters/apiVersion'
    get:
      tags:
        - API versions
      description: Gets version details by specified API version.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    $ref: '#/components/schemas/VersionSpec'
              examples:
                response:
                  value:
                    name: v1beta
                    status: SUPPORTED
                    updated: '2017-04-10T14:36:58.014Z'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/docks':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Dock
      description: Lists information for all storage docks.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: storageType
          in: query
          schema:
            type: string
            enum:
            - block
            - file
            - object
        - name: type
          in: query
          schema:
            type: string
            enum:
            - provisioner
            - attacher
        - name: status
          in: query
          schema:
            type: string
            enum:
            - available
            - unavailable
        - name: name
          in: query
          schema:
            minLength: 1
            maxLength: 255
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DockSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/docks/{dockId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/dockId'
    get:
      tags:
        - Dock
      description: Gets storage dock detail by dock ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DockSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/pools':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Pool
      description: Lists information for all block storage pool.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: storageType
          in: query
          schema:
            type: string
            enum:
            - block
            - file
            - object
        - name: name
          in: query
          schema:
            minLength: 1
            maxLength: 255
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StoragePoolSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/availabilityZones':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Availability Zone
      description: Lists availability zones.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: storageType
          in: query
          schema:
            type: string
            enum:
            - block
            - file
            - object
        - name: name
          in: query
          schema:
            minLength: 1
            maxLength: 255
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/pools/{poolId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/poolId'
    get:
      tags:
        - Pool
      description: Gets storage pool detail by pool ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StoragePoolSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/profiles':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Profiles
      description: Lists information for all profiles.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: storageType
          in: query
          schema:
            type: string
            enum:
            - block
            - file
            - object
        - name: availabilityZone
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
            - available
            - unavailable
        - name: name
          in: query
          schema:
            minLength: 1
            maxLength: 255
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProfileRespSpec'
              examples:
                response:
                  value:
                    - id: 5d8c3732-a248-50ed-bebc-539a6ffd25c1
                      name: Gold
                      description: provide gold storage service
                      storageType: block
                      provisioningProperties:
                        dataStorage:
                          recoveryTimeObjective: 10
                          provisioningPolicy: Thin
                          compression: true
                          deduplication: true
                        ioConnectivity:
                          accessProtocol: iscsi
                          maxIOPS: 1000000
                          maxBWS: 60000
                          minIOPS: 1000000
                          minBWS: 100
                          latency: 100
                      replicationProperties:
                        dataProtection:
                          isIsolated: true
                          minLifetime: P3Y6M4DT12H30M5S
                          recoveryGeographicObjective: Datacenter
                          recoveryPointObjectiveTime: P3Y6M4DT12H30M5S
                          RecoveryTimeObjective: OnlineActive
                          replicaType: Clone
                        replicaInfos:
                          replicaUpdateMode: Active
                          consistencyEnabled: true
                          replicationPeriod: P3Y6M4DT12H30M5S
                          replicationBandwidth: 60000
                      snapshotProperties:
                        schedule:
                          datetime: '2008-09-15T15:53:00.000Z'
                          occurrence: Weekly
                        retention:
                          number: 10
                          duration: 60
                        topology:
                          bucket: s3
                      customProperties:
                        key1: value1
                        key2:
                          subKey1: subValue1
                          subKey2: subValue2
                        key3: value3
                    - id: 5d8c3732-a248-50ed-bebc-539a6ffd25c2
                      name: Silver
                      storageType: block
                      description: provide silver storage service
                      provisioningProperties:
                        dataStorage:
                          provisioningPolicy: Thin
                        ioConnectivity:
                          accessProtocol: iscsi
                      customProperties:
                        key1: value1
                        key2: value2
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Profiles
      description: Creates a profile.
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileRespSpec'
              examples:
                response:
                  value:
                    id: 5d8c3732-a248-50ed-bebc-539a6ffd25c2
                    name: Silver
                    storageType: block
                    description: provide silver storage service
                    provisioningProperties:
                      dataStorage:
                        provisioningPolicy: Thin
                      ioConnectivity:
                        accessProtocol: iscsi
                    customProperties:
                      key1: value1
                      key2: value2
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/ProfileCreateSpec'
  '/v1beta/{tenantId}/profiles/{profileId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/profileId'
    get:
      tags:
        - Profiles
      description: Gets profile detail by profile ID.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Profiles
      description: Updates a profile.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileRespSpec'
              examples:
                response:
                  value:
                    id: 5d8c3732-a248-50ed-bebc-539a6ffd25c2
                    name: Silver
                    storageType: block
                    description: provide silver storage service
                    provisioningProperties:
                      dataStorage:
                        provisioningPolicy: Thin
                      ioConnectivity:
                        accessProtocol: iscsi
                    customProperties:
                      key1: value1
                      key2: value2
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/ProfileUpdateSpec'
    delete:
      tags:
        - Profiles
      description: Deletes a profile.
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/profiles/{profileId}/customProperties':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/profileId'
    post:
      tags:
        - Profiles
      description: Adds customized property to the profile.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPropertiesSpec'
              examples:
                response:
                  value:
                    key1: value1
                    key2:
                      subKey1: subValue1
                      subKey2: subValue2
                    key3: value3
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomPropertiesSpec'
    get:
      tags:
        - Profiles
      description: Lists all customized properties for the profile.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomPropertiesSpec'
              examples:
                response:
                  value:
                    key1: value1
                    key2:
                      subKey1: subValue1
                      subKey2: subValue2
                    key3: value3
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/profiles/{profileId}/customProperties/{customKey}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/profileId'
      - $ref: '#/components/parameters/customKey'
    delete:
      tags:
        - Profiles
      description: Remove a customized property from profile.
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/volumes':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Block volumes
      description: Lists information for all volumes.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: name
          in: query
          description: The volume name
          schema:
            type: string
        - name: profileId
          in: query
          description: The UUID of profile
          schema:
            type: string
        - name: poolId
          in: query
          description: The UUID of pool
          schema:
            type: string
        - name: status
          in: query
          description: The volume status
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VolumeRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Block volumes
      description: Creates a volume.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeCreateSpec'
  '/v1beta/{tenantId}/block/volumes/{volumeId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/volumeId'
    get:
      tags:
        - Block volumes
      description: Gets volume detail by volume id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Block volumes
      description: Updates a volume.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeUpdateSpec'
    delete:
      tags:
        - Block volumes
      description: Deletes a volume.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/volumes/{volumeId}/resize':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/volumeId'
    post:
      tags:
        - Block volumes
      description: Extends a volume.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeExtendSpec'
  '/v1beta/{tenantId}/block/attachments':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      parameters:
        - name: volumeId
          description: The UUID of the volume assosicated with the attachment.
          in: query
          schema:
            type: string
            uniqueItems: true
        - name: hostId
          in: query
          description: The UUID of the host assosicated with the attachment.
          schema:
            type: string
            uniqueItems: true
      tags:
        - Block volume attachments
      description: Lists information for all volume attachments.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VolumeAttachmentRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Block volume attachments
      description: Creates a volume attachment.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeAttachmentRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeAttachmentCreateSpec'
  '/v1beta/{tenantId}/block/attachments/{attachmentId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/attachmentId'
    get:
      tags:
        - Block volume attachments
      description: Gets volume attachment detail by attachment id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeAttachmentRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Block volume attachments
      description: Updates a volume attachments
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeAttachmentRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeAttachmentUpdateSpec'
    delete:
      tags:
        - Block volume attachments
      description: Deletes a volume attachment.
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/snapshots':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: volumeId
          description: The UUID of the volume assosicated with the snapshot.
          in: query
          schema:
            type: string
        - name: status
          in: query
          description: The volume snapshot status
          schema:
            type: string
      tags:
        - Block volume snapshots
      description: Lists information for all volume snapshots.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VolumeSnapshotRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Block volume snapshots
      description: Creates a volume snapshot.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeSnapshotRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeSnapshotCreateSpec'
  '/v1beta/{tenantId}/block/snapshots/{snapshotId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/snapshotId'
    get:
      tags:
        - Block volume snapshots
      description: Gets snapshot detail by volume snapshot id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeSnapshotRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Block volume snapshots
      description: Updates a volume snapshot.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeSnapshotRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
    delete:
      tags:
        - Block volume snapshots
      description: Deletes a volume snapshot.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/volumeGroups':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Block volume group
      description: Lists information for all volume groups.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VolumeGroupRespSpec'
              examples:
                response:
                  value:
                    - id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
                      name: volumeGroup-demo
                      status: available
                      description: volumeGroup test
                      profiles:
                        - 993c87dc-1928-498b-9767-9da8f901d6ce
                        - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
                      availabilityZone: default
                      poolId: 6e14588f-9da9-5ef3-a89d-86375c1352f6
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Block volume group
      description: Creates a volume group.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeGroupRespSpec'
              examples:
                response:
                  value:
                    - id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
                      name: volumeGroup-demo
                      status: creating
                      description: volumeGroup test
                      profiles:
                        - 993c87dc-1928-498b-9767-9da8f901d6ce
                        - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
                      availabilityZone: default
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/VolumeGroupCreateSpec'
  '/v1beta/{tenantId}/block/volumeGroups/{volumeGroupId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/volumeGroupId'
    get:
      tags:
        - Block volume group
      description: Gets volume group detail by volume group id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeGroupRespSpec'
              examples:
                response:
                  value:
                    id: 015184f3-8e73-47fd-8f57-26ea912e2a6b
                    createdAt: '2018-06-03T07:02:35.389Z'
                    name: volumeGroup-demo
                    status: available
                    description: volumeGroup test
                    profiles:
                      - 993c87dc-1928-498b-9767-9da8f901d6ce
                      - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
                    availabilityZone: default
                    poolId: 6e14588f-9da9-5ef3-a89d-86375c1352f6
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Block volume group
      description: Updates a volume group.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeGroupRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: volumeGroup-demo
                description:
                  type: string
                  example: volumeGroup test
                addVolumes:
                  type: array
                  items:
                    type: string
                    example:
                      - 993c87dc-1928-498b-9767-9da8f901d6ce
                      - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
                removeVolumes:
                  type: array
                  items:
                    type: string
                    example: 1b7277b8-493a-4c8d-bccd-89db580e5f60
        required: true
    delete:
      tags:
        - Block volume group
      description: Deletes a volume group.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/replications':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Block Replications
      description: Lists information for all replications.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: name
          description: The replication name
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReplicationRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Block Replications
      description: Create a replication.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplicationRespSpec'
              examples:
                response:
                  value:
                    id: e416db95-b6f4-4669-a075-5a873d050a93
                    createdAt: '2018-05-07T07:02:35.389Z'
                    updatedAt: null
                    name: replication-demo
                    description: volume replication demo
                    availabilityZone: default
                    primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
                    secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
                    primaryReplicationDriverData:
                      AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
                    secondaryReplicationDriverData:
                      AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
                    ReplicationStatus: enabled
                    replicationMode: sync
                    replicationPeriod: 0
                    profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/ReplicationCreateSpec'
  '/v1beta/{tenantId}/block/replications/{replicationId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/replicationId'
    get:
      tags:
        - Block Replications
      description: Gets replication detail by replication id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplicationRespSpec'
              examples:
                response:
                  value:
                    id: e416db95-b6f4-4669-a075-5a873d050a93
                    createdAt: '2018-05-07T07:02:35.389Z'
                    updatedAt: null
                    name: replication-demo
                    description: volume replication demo
                    availabilityZone: default
                    primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
                    secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
                    primaryReplicationDriverData:
                      AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
                    secondaryReplicationDriverData:
                      AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
                    ReplicationStatus: enabled
                    replicationMode: sync
                    replicationPeriod: 0
                    profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - Block Replications
      description: Updates a replication.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplicationRespSpec'
              examples:
                response:
                  value:
                    id: e416db95-b6f4-4669-a075-5a873d050a93
                    createdAt: '2018-05-07T07:02:35.389Z'
                    updatedAt: null
                    name: replication-demo
                    description: volume replication demo
                    availabilityZone: default
                    primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
                    secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
                    primaryReplicationDriverData:
                      AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
                    secondaryReplicationDriverData:
                      AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
                      HostIp: 192.168.56.100
                      HostName: opensds-master
                      Mountpoint: >-
                        /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
                      lvPath: >-
                        /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
                    ReplicationStatus: enabled
                    replicationMode: sync
                    replicationPeriod: 0
                    profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
    delete:
      tags:
        - Block Replications
      description: Deletes a replication.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/replications/detail':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Block Replications
      description: Lists detail information for all replications.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as name, createdAt
          schema:
            type: string
        - name: name
          description: The replication name
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReplicationRespSpec'
              examples:
                response:
                  value:
                    - id: e416db95-b6f4-4669-a075-5a873d050a93
                      createdAt: '2018-05-07T07:02:35.389Z'
                      updatedAt: null
                      name: replication-demo
                      description: volume replication demo
                      availabilityZone: default
                      primaryVolumeId: 655ec3e2-5840-4138-b5bd-bce930d2acda
                      secondaryVolumeId: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
                      primaryReplicationDriverData:
                        AttachmentId: 0a1bb216-3096-4be0-a392-5124937717b7
                        HostIp: 192.168.56.100
                        HostName: opensds-master
                        Mountpoint: >-
                          /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:baec258b-8f79-4bbc-bf97-28addfa903d3-lun-1
                        lvPath: >-
                          /dev/opensds-volumes-default/volume-baec258b-8f79-4bbc-bf97-28addfa903d3
                      secondaryReplicationDriverData:
                        AttachmentId: b3e1d639-66f4-486c-9be9-217b7ac05ac3
                        HostIp: 192.168.56.100
                        HostName: opensds-master
                        Mountpoint: >-
                          /dev/disk/by-path/ip-192.168.56.100:3260-iscsi-iqn.2017-10.io.opensds:1f782f63-21cd-4475-9dcb-e2cc0eae7546-lun-1
                        lvPath: >-
                          /dev/opensds-volumes-default/volume-1f782f63-21cd-4475-9dcb-e2cc0eae7546
                      ReplicationStatus: enabled
                      replicationMode: sync
                      replicationPeriod: 0
                      profileId: fb210bfe-8809-4a8f-aaf2-53acd98e28ac
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/replications/{replicationId}/enable':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/replicationId'
    post:
      tags:
        - Block Replications
      description: Enable Replication.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/block/replications/{replicationId}/disable':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/replicationId'
    post:
      tags:
        - Block Replications
      description: Disable Replication.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'

  '/v1beta/{tenantId}/block/replications/{replicationId}/failover':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/replicationId'
    post:
      tags:
        - Block Replications
      description: Failover Replication.
      responses:
        '202':
          description: Accepted
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FailoverReplicationSpec'
  '/v1beta/{tenantId}/file/shares':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - File Shares
      description: Lists information for all file shares.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/sortDir'
      - name: sortKey
        in: query
        description: Sorting key word
        schema:
          type: string
      - name: name
        in: query
        description: The fileshare name
        schema:
          type: string
      - name: profileId
        in: query
        description: The UUID of profile
        schema:
          type: string
      - name: status
        in: query
        description: The fileshare status
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileShareRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - File Shares
      description: Creates a file share.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FileShareCreateSpec'
  '/v1beta/{tenantId}/file/shares/{fileshareId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/fileshareId'
    get:
      tags:
        - File Shares
      description: Gets fileshare detail by fileshare id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - File Shares
      description: Updates a file share.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FileShareUpdateSpec'
    delete:
      tags:
        - File Shares
      description: Deletes a fileshare.
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/file/snapshots':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - File Share Snapshots
      description: Lists information for all file share spanshots.
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/offset'
      - $ref: '#/components/parameters/sortDir'
      - name: sortKey
        in: query
        description: Sorting key word
        schema:
          type: string
      - name: name
        in: query
        description: The fileshare snapshot name
        schema:
          type: string
      - name: status
        in: query
        description: The fileshare snapshot status
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileShareSnapshotRespSpec'
              examples:
                response:
                  value:
                  - id: 405ded84-b6ff-4ac6-8a3c-cb0e82dcf372
                    createdAt: 2019-12-04T13:23:13
                    updatedAt: 2019-12-04T13:31:03
                    tenantId: e93b4c0934da416eb9c8d120c5d04d96
                    userId:
                    fileshareId: eedfbfcf-de50-4476-a2b6-058e6bfa3558
                    name: snaptest
                    description: Testing file share snapshot
                    shareSize: 1
                    snapshotSize: 1
                    status: available
                    profileId: ed273ef0-4602-4790-ae68-09bdbb22d133
                    metadata: {"lvPath": "/dev/opensds-files-default/test","snapshotID": "405ded84-b6ff-4ac6-8a3c-cb0e82dcf372","snapshotName": "snaptest"}
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - File Share Snapshots
      description: Creates a file share snapshot.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareSnapshotRespSpec'
              examples:
                response:
                  value:
                  - id: 405ded84-b6ff-4ac6-8a3c-cb0e82dcf372
                    createdAt: 2019-12-04T13:23:13
                    tenantId: e93b4c0934da416eb9c8d120c5d04d96
                    userId:
                    fileshareId: eedfbfcf-de50-4476-a2b6-058e6bfa3558
                    name: snaptest
                    description: Testing file share snapshot
                    shareSize: 1
                    snapshotSize: 1
                    status: creating
                    profileId: ed273ef0-4602-4790-ae68-09bdbb22d133
                    metadata: {"lvPath": "/dev/opensds-files-default/test","snapshotID": "405ded84-b6ff-4ac6-8a3c-cb0e82dcf372","snapshotName": "snaptest"}
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FileShareSnapshotCreateSpec'
  '/v1beta/{tenantId}/file/snapshots/{shareSnapshotId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/shareSnapshotId'
    get:
      tags:
        - File Share Snapshots
      description: Gets fileshare snapshot details by fileshare id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareSnapshotRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
        - File Share Snapshots
      description: Updates a file share Snapshot.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareSnapshotRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FileShareSnapshotUpdateSpec'
    delete:
      tags:
        - File Share Snapshots
      description: Deletes a fileshare snapshot.
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/file/acls':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - File Share Acls
      description: Lists information for all file share acls.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileShareAclRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - File Share Acls
      description: Creates a file share acl.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareAclRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        $ref: '#/components/requestBodies/FileShareAclCreateSpec'
  '/v1beta/{tenantId}/file/acls/{fileshareaclId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/fileshareaclId'
    get:
      tags:
        - File Share Acls
      description: Gets fileshareacl detail by fileshareacl id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileShareAclRespSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    delete:
      tags:
        - File Share Acls
      description: Deletes a fileshareacl.
      responses:
        '202':
          description: Accepted
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/host/hosts':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Host
      description: Lists host information.
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/sortDir'
        - name: sortKey
          in: query
          description: Sorting key word, such as hostName, createdAt
          schema:
            type: string
        - name: hostName
          in: query
          description: Host name
          schema:
            maxLength: 255
            minLength: 1
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HostRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
      - Host
      description: Creates host.
      requestBody:
        $ref: '#/components/requestBodies/HostCreateSpec'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'

  '/v1beta/{tenantId}/host/hosts/{hostId}':
    parameters:
      - $ref: '#/components/parameters/tenantId'
      - $ref: '#/components/parameters/hostId'
    get:
      tags:
      - Host
      description: Get details about the host
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    put:
      tags:
      - Host
      description: Modify host details
      operationId: putHost
      requestBody:
        $ref: '#/components/requestBodies/HostUpdateSpec'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostRespSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    delete:
      tags:
      - Host
      description: Removes host
      responses:
        '200':
          description: OK
          content: {}
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '404':
          $ref: '#/components/responses/HTTPStatus404'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/metrics':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Metrics
      description: Lists metrics for the specified time series.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
    post:
      tags:
        - Metrics
      description: Trigger metric collection for the specified driver.
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricSpec'
        '400':
          $ref: '#/components/responses/HTTPStatus400'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectMetricSpec'
  '/v1beta/{tenantId}/metrics/urls':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Metrics
      description: Lists urls of metric management tools for visualization, alert management etc.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UrlSpec'
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/metrics/downloadconf':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    get:
      tags:
        - Metrics
      description: download a config file.
      parameters:
      - name: conftype
        in: query
        required: true
        description: Name of the tool to which the configuration file to be downloaded from.
        schema:
          minimum: 1
          type: string
          enum:
            - prometheus
            - alertmanager
            - grafana
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
  '/v1beta/{tenantId}/metrics/uploadconf':
    parameters:
      - $ref: '#/components/parameters/tenantId'
    post:
      tags:
        - Metrics
      description: upload a config file.
      parameters:
      - name: conftype
        in: query
        required: true
        description: Name of the tool to which the configuration file to be uploaded.
        schema:
          minimum: 1
          type: string
          enum:
            - prometheus
            - alertmanager
            - grafana
      responses:
        '200':
          description: OK
        '401':
          $ref: '#/components/responses/HTTPStatus401'
        '403':
          $ref: '#/components/responses/HTTPStatus403'
        '500':
          $ref: '#/components/responses/HTTPStatus500'
security:
  - basicAuth: []
externalDocs:
  description:  Unified SODA API for data management across multiple, heterogeneous storage backends.
  url: 'https://github.com/sodafoundation/api'
servers:
  - url: 'https://localhost:50040/'
  - url: 'http://localhost:50040/'
components:
  parameters:
    apiVersion:
      name: apiVersion
      in: path
      required: true
      description: API version string
      schema:
        type: string
        pattern: 'v([1-9][0-9]*)((alpha)([1-9][0-9]*)|(beta)([1-9][0-9]*))?'
    tenantId:
      name: tenantId
      in: path
      required: true
      description: The tenant UUID in a multi-tenancy environment.
      schema:
        type: string
    dockId:
      name: dockId
      in: path
      required: true
      description: The UUID of the storage backend (dock) service.
      schema:
        type: string
    poolId:
      name: poolId
      in: path
      required: true
      description: The UUID of the storage pool.
      schema:
        type: string
    profileId:
      name: profileId
      in: path
      required: true
      description: The UUID of the profile.
      schema:
        type: string
    fileshareId:
      name: fileshareId
      in: path
      required: true
      description: The UUID of the file share.
      schema:
        type: string
    fileshareaclId:
      name: fileshareaclId
      in: path
      required: true
      description: The UUID of the file share acl.
      schema:
        type: string
    volumeId:
      name: volumeId
      in: path
      required: true
      description: The UUID of the volume.
      schema:
        type: string
    customKey:
      name: customKey
      in: path
      required: true
      description: The key of the customized properties.
      schema:
        type: string
    attachmentId:
      name: attachmentId
      in: path
      required: true
      description: The UUID of the volume attachment.
      schema:
        type: string
    snapshotId:
      name: snapshotId
      in: path
      required: true
      description: The UUID of the volume snapshot.
      schema:
        type: string
    shareSnapshotId:
      name: shareSnapshotId
      in: path
      required: true
      description: The UUID of the fileshare snapshot.
      schema:
        type: string
    volumeGroupId:
      name: volumeGroupId
      in: path
      required: true
      description: The UUID of the volume group.
      schema:
        type: string
    replicationId:
      name: replicationId
      in: path
      required: true
      description: The UUID of the relication.
      schema:
        type: string
    hostId:
      name: hostId
      in: path
      required: true
      description: The UUID of the host.
      schema:
        type: string
    limit:
      name: limit
      in: query
      description: Number of query results on multiple pages
      schema:
        minimum: 1
        type: integer
        format: int32
    offset:
      name: offset
      in: query
      description: Start position of the pagination query
      schema:
        minimum: 0
        type: integer
        format: int32
    sortDir:
      name: sortDir
      in: query
      description: Ascending or descending
      schema:
        type: string
        enum:
        - asc
        - desc
  responses:
    HTTPStatus400:
      description: BadRequest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSpec'
    HTTPStatus401:
      description: NotAuthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSpec'
    HTTPStatus403:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSpec'
    HTTPStatus404:
      description: The resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSpec'
    HTTPStatus500:
      description: An unexpected error occured.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSpec'
  requestBodies:
    ReplicationCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ReplicationCreateSpec'
    FailoverReplicationSpec:
      content:
        application/json:
          schema:
            description: >-
              FailoverReplicationSpec represents failover replication relationship
              between the volumes on the primary and secondary sites.
            type: object
            properties:
              allowAttachedVolume:
                type: boolean
              secondaryBackendId:
                type: string
    ProfileCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProfileCreateSpec'
    ProfileUpdateSpec:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
    VolumeCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VolumeCreateSpec'
    VolumeUpdateSpec:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
    VolumeExtendSpec:
      content:
        application/json:
          schema:
            type: object
            description: 'Extends the size of a volume to a requested size, in gibibytes (GiB).'
            required:
              - newSize
            properties:
              newSize:
                type: integer
                format: int64
                example: 2
    VolumeSnapshotCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VolumeSnapshotCreateSpec'
    VolumeGroupCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VolumeGroupCreateSpec'
    VolumeAttachmentCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VolumeAttachmentCreateSpec'
    VolumeAttachmentUpdateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VolumeAttachmentUpdateSpec'
    HostCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HostCreateSpec'
    HostUpdateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HostUpdateSpec'
    FileShareCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FileShareCreateSpec'
    FileShareUpdateSpec:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
    FileShareSnapshotCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FileShareSnapshotCreateSpec'
    FileShareSnapshotUpdateSpec:
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
    FileShareAclCreateSpec:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FileShareAclCreateSpec'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  schemas:
    BaseModel:
      type: object
      properties:
        id:
          type: string
          example: 084bf71e-a102-11e7-88a8-e31fe6d52248
          readOnly: true
        createdAt:
          type: string
          format: date-time
          example: '2017-07-10T14:36:58.014Z'
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          example: '2017-07-10T14:36:58.014Z'
          readOnly: true
    DataStorageLoS:
      type: object
      properties:
        recoveryTimeObjective:
          example: 10
          description: Recovery Time Objective(RTO) is a maximum acceptable time within which storage must be restored after disaster. For e.g 10 sec.
          type: integer
          format: int64
        provisioningPolicy:
          default: thick
          description: The provisioning policy of the pool. It can be thick or thin.
          type: string
          enum:
            - Thin
            - Thick
        compression:
          description: The optimization policy to reduce the number of data bits to save storage space
          default: false
          type: boolean
        deduplication:
          description: The optimization policy to remove redundant data or file on the storage
          default: false
          type: boolean
        characterCodeSet:
          description: The code set to store the data
          example: ASCII
          type: string
        maxFileNameLengthBytes:
          description: The maximum filename length in bytes
          example: 255
          type: integer
          format: int64
        storageAccessCapability:
          description: The type of access capability. This can be set of read,write or execute.
          example: Read
          type: array
          items:
            type: string
            enum:
              - Read
              - Write
              - Execute
      description: DataStorageLoS can be used to describe a service option covering
        storage provisioning and availability.
    IOConnectivityLoS:
      type: object
      properties:
        accessProtocol:
          description: The type of access protocol. This can be iscsi, rbd, fibre channel, or DSWare(Data Service Middleware), nvmeof and nfs
          example: iscsi
          type: string
          enum:
            - iscsi
            - rbd
            - fibre_channel
            - nvmeof
            - DSWare
            - NFS
        maxIOPS:
          example: 150
          description: The maximum IOPS(Input/Output Operations Per Second) supported by storage. For e.g. 150IOPS
          type: integer
          format: int64
        minIOPS:
          example: 50
          description: The minimum IOPS(Input/Output Operations Per Second) supported by storage. In other words, performance can not drop below this level. For e.g. 50IOPS
          type: integer
          format: int64
        maxBWS:
          description: The maximum bandwidth supported by storage. For e.g. 5mbps
          example: 5
          type: integer
          format: int64
        minBWS:
          description: The minimum bandwidth supported by storage. In other words, performance can not drop below this level. For e.g. 1mbps
          example: 1
          type: integer
          format: int64
        latency:
          description: The latency of the storage in ns(nanosec.). For e.g. 1ns
          example: 1
          type: integer
          format: int64
      description: IOConnectivityLoS can be used to specify the characteristics of storage connectivity.
    DataProtectionLoS:
      type: object
      properties:
        isIsolated:
          default: false
          example: true
          description: Isolated storage is designed to prevent data corruption and data loss
          type: boolean
        minLifetime:
          description: It is an ISO 8601 duration that specifies the minimum lifetime required for the replica
          type: string
          example: P3Y6M4DT12H30M5S
        RecoveryGeographicObjective:
          description: Supported failure domain from where data can be restored after disaster
          example: datacenter
          type: string
          enum:
            - Datacenter
            - Rack
            - RackGroup
            - Region
            - Row
            - Server
        RecoveryPointObjectiveTime:
          description: It's an ISO 8601 time interval that specifies the maximum source information that may be lost on failure. In the case of isIsolated = false, failure of the domain is not considered.
          type: string
          example: P3Y6M4DT12H30M5S
        RecoveryTimeObjective:
          description: It specifies the relative time required to make a replica available as a source
          example: offline
          type: string
          enum:
            - OnlineActive
            - OnlinePassive
            - Nearline
            - Offline
        ReplicaType:
          description: This value specify the type of replica
          example: snapshot
          type: string
          enum:
            - Clone
            - Mirror
            - Snapshot
            - TokenizedClone
      description: DataProtectionLoS describes a replica that protects data from loss.
        The requirements must be met collectively by the communication path and the
        replica.
    DockSpec:
      description: >-
        A backend is initialized by specific driver configuration. Each backend
        can be regarded as a docking service between SDS controller and storage
        service.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - name
            - status
            - driverName
            - endpoint
            - nodeId
          properties:
            type:
              type: string
              enum:
                - provisioner
                - attacher
            name:
              type: string
            description:
              type: string
            storageType:
              type: string
              enum:
                - block
                - file
                - object
            status:
              type: string
              enum:
                - available
                - unavailable
            driverName:
              type: string
              enum:
                - default
                - lvm
                - ceph
                - cinder
                - huawei_oceanstor_block
                - huawei_fusionstorage
            endpoint:
              type: string
              example: '0.0.0.0:50050'
            nodeId:
              type: string
              example: 127.0.0.1
            metadata:
              type: object
    StoragePoolSpec:
      description: >-
        A pool is discoveried and updated by a dock service. Each pool can be
        regarded as a physical storage pool or a virtual storage pool. It is a
        logical and atomic pool and can be abstracted from any storage platform.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - name
            - status
            - availabilityZone
            - totalCapacity
            - freeCapacity
            - dockId
          properties:
            name:
              type: string
            storageType:
              type: string
              enum:
                - block
                - file
                - object
            description:
              type: string
            multiAttach:
              type: boolean
            status:
              type: string
              enum:
                - available
                - unavailable
            availabilityZone:
              type: string
              default: default
            totalCapacity:
              type: integer
              format: int64
            freeCapacity:
              type: integer
              format: int64
            dockId:
              type: string
              example: f4a5e666-c669-4c64-a2a1-8f9ecd560c78
            extras:
              $ref: '#/components/schemas/StoragePoolExtraSpec'
    StoragePoolExtraSpec:
      description: >-
        StoragePoolExtraSpec object represents the extra properties of the pool,
        such as supported capabilities.
      type: object
      properties:
        dataStorage:
          $ref: '#/components/schemas/DataStorageLoS'
        ioConnectivity:
          $ref: '#/components/schemas/IOConnectivityLoS'
        dataProtection:
          $ref: '#/components/schemas/DataProtectionLoS'
        customProperties:
          type: object
          additionalProperties:
            type: object
          example:
            key1: value1
            key2: false
            key3:
              key31: value31
    ProfileCreateSpec:
      description: A configuration profile is identified by a unique name and ID. With
        adding extra properties, each profile can contain a set of tags of storage
        capabilities which are desirable features for a class of applications.
      required:
        - name
        - storageType
      type: object
      properties:
        name:
          description: The name of the profile
          minLength: 1
          maxLength: 255
          pattern: '[A-Za-z0-9_-]'
          type: string
          example: File_Profile
        storageType:
          description: The type of the storage. It can be either block, file or object
          example: block
          type: string
          enum:
          - block
          - file
          - object
        description:
          description: The description of the profile
          type: string
        provisioningProperties:
          $ref: '#/components/schemas/ProvisioningPropertiesSpec'
        replicationProperties:
          $ref: '#/components/schemas/ReplicationPropertiesSpec'
        snapshotProperties:
          $ref: '#/components/schemas/SnapshotPropertiesSpec'
        dataProtectionProperties:
          $ref: '#/components/schemas/DataProtectionPropertiesSpec'
        customProperties:
          $ref: '#/components/schemas/CustomPropertiesSpec'
    ProfileRespSpec:
      description: A configuration profile is identified by a unique name and ID. With
        adding extra properties, each profile can contain a set of tags of storage
        capabilities which are desirable features for a class of applications.
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
            name:
              description: The name of the profile
              minLength: 1
              maxLength: 255
              pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-\_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-\_]*[A-Za-z0-9])$'
              type: string
              example: File_Profile
            storageType:
              description: The type of the storage. It can be either block, file or object
              example: block
              type: string
              enum:
              - block
              - file
              - object
            description:
              description: The is description of the profile
              type: string
            provisioningProperties:
              $ref: '#/components/schemas/ProvisioningPropertiesSpec'
            replicationProperties:
              $ref: '#/components/schemas/ReplicationPropertiesSpec'
            snapshotProperties:
              $ref: '#/components/schemas/SnapshotPropertiesSpec'
            dataProtectionProperties:
              $ref: '#/components/schemas/DataProtectionPropertiesSpec'
            customProperties:
              $ref: '#/components/schemas/CustomPropertiesSpec'
    FileShareCreateSpec:
      type: object
      required:
        - name
        - size
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-\_]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-\_]*[A-Za-z0-9])$'
        description:
          type: string
        size:
          type: integer
          format: int64
          example: 2
        availabilityZone:
          type: string
          default: default
        profileId:
          type: string

    FileShareRespSpec:
      description: >-
        FileShare is a file system created by nfs southbound driver, it can be
        mounted on to physical machine or virtual machine instance.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            name:
              type: string
            description:
              type: string
            size:
              type: integer
              format: int64
              example: 2
            availabilityZone:
              type: string
              default: default
            status:
              type: string
              readOnly: true
            profileId:
              type: string
            protocols:
              type: array
              items:
                type: string
              readOnly: true
            exportLocations:
              type: array
              items:
                type: string
              readOnly: true
            metadata:
              type: object
              readOnly: true
              additionalProperties:
                type: string
              example:
                lvPath: string
                nfsFileshareID: string
                nfsFileshareName: string
    FileShareSnapshotCreateSpec:
      type: object
      required:
      - name
      - fileshareId
      properties:
        fileshareId:
          type: string
        name:
          minLength: 1
          maxLength: 255
          type: string
        description:
          type: string
    FileShareSnapshotRespSpec:
      description: Snapshot of file share has following specification.
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          fileshareId:
            type: string
          snapId:
            type: string
          createdAt:
            type: string
          updatedAt:
            type: string
          tenantId:
            type: string
            readOnly: true
          userId:
            type: string
            readOnly: true
          name:
            type: string
          description:
            type: string
          shareSize:
            type: integer
            format: int64
            example: 2
          snapshotSize:
            type: integer
            format: int64
            example: 2
          status:
            type: string
            readOnly: true
          profileId:
            type: string
          metadata:
            type: object
            readOnly: true
            additionalProperties:
              type: string
            example:
              snapshotId: string
              snapshotName: string
              lvPath: string
    FileShareAclCreateSpec:
      type: object
      required:
        - fileshareId
        - type
        - accessCapability
        - accessTo
      properties:
        fileshareId:
          type: string
        type:
          type: string
        accessCapability:
          type: array
          items:
            type: string
            enum:
              - Read
              - Write
              - Execute
        accessTo:
          type: string
        description:
          type: string

    FileShareAclRespSpec:
      description: File Share Acl API describes the  acl of file share resource
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            fileshareId:
              type: string
            type:
              type: string
            accessCapability:
              type: array
              items:
                type: string
                enum:
                  - Read
                  - Write
                  - Execute
            accessTo:
              type: string
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            description:
              type: string
            status:
              type: string
              readOnly: true
            profileId:
              type: string
              readOnly: true
            metadata:
              type: object
              readOnly: true
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2
    ProvisioningPropertiesSpec:
      description: >-
        ProvisioningPropertiesSpec represents some suggested properties for
        performing provisioning policies.
      type: object
      properties:
        dataStorage:
          $ref: '#/components/schemas/DataStorageLoS'
        ioConnectivity:
          $ref: '#/components/schemas/IOConnectivityLoS'
    ReplicationPropertiesSpec:
      type: object
      properties:
        dataProtection:
          $ref: '#/components/schemas/DataProtectionLoS'
        replicaInfos:
          type: object
          properties:
            replicaUpdateMode:
              description: It specify the replica update mode. It can be Active, Adaptive, Asynchronous, Synchronous
              example: Active
              type: string
              enum:
                - Active
                - Adaptive
                - Asynchronous
                - Synchronous
            replcationBandwidth:
              description: The bandwidth required for replication in MB
              example: 5
              type: integer
              format: int64
            replicationPeriod:
              description: It is an ISO 8601 interval that specify the required time for replication
              type: string
              example: P3Y6M4DT12H30M5S
            consistencyEnalbed:
              description: It specify the data consitency in replication
              default: false
              example: true
              type: boolean
      description: ReplicationPropertiesSpec represents some suggested properties
        for performing replication policies.
    SnapshotPropertiesSpec:
      type: object
      properties:
        schedule:
          type: object
          properties:
            datetime:
              example: "2019-09-07T07:02:35.389"
              type: string
              format: date-time
            occurrence:
              description: The occurence of snapshot creation
              example: Daily
              type: string
              enum:
                - Daily
                - Weekly
                - Monthly
        retention:
          type: object
          properties:
            duration:
              description: The retention time of snapshot in days
              example: 15
              type: integer
              format: int64
            number:
              description: The number of snapshot at a particular time
              example: 10
              type: integer
              format: int64
        topology:
          type: object
          properties:
            bucket:

              type: string
      description: SnapshotPropertiesSpec represents some suggested properties for
        performing snapshot policies.
    DataProtectionPropertiesSpec:
      type: object
      properties:
        dataProtection:
          $ref: '#/components/schemas/DataProtectionLoS'
        consistencyEnalbed:
          description: It specify the data consitency in dataprotection
          default: false
          example: true
          type: boolean
      description: DataProtectionPropertiesSpec represents some suggested properties
        for performing data protection policies.
    CustomPropertiesSpec:
      type: object
      additionalProperties: {}
      description: CustomPropertiesSpec is a map of keys and JSON object that represents
        the customized properties of profile, such as requested capabilities including
        disk type, latency, de-duplicaiton, compression and so forth.
      example:
        key1: value1
        key2: false
        key3:
          key31: value31
    VolumeCreateSpec:
      description: >-
        Volume is an block device created by storage service, it can be attached
        to physical machine or virtual machine instance.
      type: object
      required:
        - name
        - size
      properties:
        name:
          type: string
        multiAttach:
          type: boolean
        description:
          type: string
        size:
          type: integer
          format: int64
          example: 2
        availabilityZone:
          type: string
          default: default
        profileId:
          type: string
        poolId:
          type: string
        snapshotId:
          type: string
        groupId:
          type: string
        snapshotFromCloud:
          type: boolean
        replicationId:
          type: string
    VolumeRespSpec:
      description: >-
        Volume is an block device created by storage service, it can be attached
        to physical machine or virtual machine instance.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            name:
              type: string
            multiAttach:
              type: boolean
            description:
              type: string
            size:
              type: integer
              format: int64
              example: 2
            availabilityZone:
              type: string
              default: default
            status:
              type: string
              readOnly: true
            profileId:
              type: string
            poolId:
              type: string
            snapshotId:
              type: string
            groupId:
              type: string
            snapshotFromCloud:
              type: boolean
            replicationId:
              type: string
            identifier:
              type: object
              properties:
                durableName:
                  type: string
                durableNameFormat:
                  type: string
            replicationDriverData:
              type: object
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2
            metadata:
              type: object
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2

    VolumeAttachmentCreateSpec:
      description: Attachment is a description of volume attached resource.
      required:
      - volumeId
      - hostId
      type: object
      properties:
        hostId:
          type: string
        volumeId:
          type: string
        attachMode:
          type: string
          enum:
          - ro
          - rw
    VolumeAttachmentRespSpec:
      description: Attachment is a description of volume attached resource.
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          tenantId:
            type: string
            readOnly: true
          userId:
            type: string
            readOnly: true
          attachMode:
            type: string
            enum:
            - rw
            - ro
          hostId:
            type: string
          volumeId:
            type: string
          mountpoint:
            type: string
          status:
            type: string
            readOnly: true
          connectionInfo:
            $ref: '#/components/schemas/ConnectionInfo'


    VolumeAttachmentUpdateSpec:
      type: object
      properties:
        mountpoint:
          type: string


    ConnectionInfo:
      description: >-
        ConnectionInfo is a structure for all properties of connection when
        creating a volume attachment.
      type: object
      properties:
        driverVolumeType:
          type: string
        data:
          type: object
          additionalProperties:
            type: object
          example:
            key1: value1
            key2: false
            key3:
              key31: value31
        extraProperties:
          type: object
          additionalProperties:
            type: object
          example:
            key1: value1
            key2: false
            key3:
              key31: value31
    VolumeSnapshotCreateSpec:
      type: object
      required:
        - name
        - volumeId
      properties:
        name:
          type: string
        description:
          type: string
        volumeId:
          type: string
        profileId:
          type: string
    VolumeSnapshotRespSpec:
      description: Snapshot is a description of volume snapshot resource.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            name:
              type: string
            description:
              type: string
            size:
              type: integer
              format: int64
              readOnly: true
            status:
              type: string
              readOnly: true
            volumeId:
              type: string
            profileId:
              type: string
            metadata:
              type: object
              example:
                key1: value1
                key2: value2
    VolumeGroupCreateSpec:
      type: object
      required:
        - profiles
        - name
      properties:
        name:
          type: string
          example: volumeGroup-demo
        description:
          type: string
          example: volume group test
        profiles:
          type: array
          items:
            type: string
          example:
            - 993c87dc-1928-498b-9767-9da8f901d6ce
            - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
    VolumeGroupRespSpec:
      description: >-
        Volume group contains a list of volumes that are used in the same
        application.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            name:
              type: string
              example: volumeGroup-demo
            description:
              type: string
              example: volume group test
            availabilityZone:
              type: string
              example: default
              readOnly: true
            status:
              type: string
              readOnly: true
            poolId:
              type: string
              readOnly: true
            profiles:
              type: array
              items:
                type: string
              example:
                - 993c87dc-1928-498b-9767-9da8f901d6ce
                - 90d667f0-e9a9-427c-8a7f-cc714217c7bd
    ReplicationCreateSpec:
      type: object
      required:
        - name
        - primaryVolumeId
        - secondaryVolumeId
        - availabilityZone
        - replicationPeriod
        - replicationMode
        - profileId
      properties:
        name:
          type: string
          example: replication-demo
        description:
          type: string
          example: This is replication demo api specs
        availabilityZone:
          type: string
          example: default
        primaryVolumeId:
          type: string
          example: 655ec3e2-5840-4138-b5bd-bce930d2acda
        secondaryVolumeId:
          type: string
          example: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
        replicationMode:
          type: string
          enum:
            - sync
            - async
        replicationPeriod:
          type: integer
          format: int64
          minimum: 0
        profileId:
          type: string
          example: a66976e0-9fbf-4cf3-912a-e891dd41b1a5
    ReplicationRespSpec:
      description: >-
        Replication represents a replication relationship between the volumes on
        the primary and secondary sites.
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          properties:
            tenantId:
              type: string
              readOnly: true
            userId:
              type: string
              readOnly: true
            name:
              type: string
              example: replication-demo
            description:
              type: string
              example: This is replication demo api specs
            availabilityZone:
              type: string
              example: default
            replicationStatus:
              type: string
              enum:
                - available
                - creating
                - deleting
                - enabling
                - disabling
                - failing_over
                - failing_back
                - error
                - error_deleting
                - error_enabling
                - error_disabling
                - error_failover
                - error_failback
                - enabled
                - disabled
                - failed_over
              readOnly: true
            primaryVolumeId:
              type: string
              example: 655ec3e2-5840-4138-b5bd-bce930d2acda
            secondaryVolumeId:
              type: string
              example: 8cfa9839-7fb8-4b16-ae7a-5eb7f2dafd0b
            primaryReplicationDriverData:
              type: object
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2
            secondaryReplicationDriverData:
              type: object
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2
            replicationMode:
              type: string
              enum:
                - sync
                - async
            replicationPeriod:
              type: integer
              format: int64
              minimum: 0
            profileId:
              type: string
              example: a66976e0-9fbf-4cf3-912a-e891dd41b1a5

    ErrorSpec:
      description: >-
        Detailed HTTP error response, which consists of a HTTP status code, and
        a custom error message unique for each failure case.
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
        message:
          type: string
    VersionSpec:
      description: >-
        Lists information for all SDS controller API versions. An API version is
        a  string that consists of a 'v' + number, or 'v' + number + 'alpha'  or
        'beta' + number.
      type: object
      required:
        - name
        - status
        - updated
      properties:
        name:
          type: string
          example: v1beta
        status:
          type: string
          enum:
            - CURRENT
            - SUPPORTED
            - DEPRECATED
        updated:
          type: string
          format: date-time
          example: '2017-04-10T14:36:58.014Z'
    HostCreateSpec:
      required:
      - accessMode
      - osType
      - ip
      - hostName
      type: object
      properties:
        osType:
          type: string
          enum:
          - linux
          - windows
          - esxi
        hostName:
          type: string
          minLength: 1
          maxLength: 64
          pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'
          description: Only numbers, letters, '-', '.' in ASCII characters are allowed.
          example: opensds-node1
        ip:
          type: string
          description: IP address of the host, mandatory
          pattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
          example: 8.8.8.8
        port:
          maximum: 65535
          minimum: 1
          type: integer
          description: Host access port
          format: int32
          example: 22
        accessMode:
          type: string
          description: The way to access host, system will access host to get more information and install agent if accessMode is 'agent'. 'port', 'username'and 'password' are requried in 'agent' mode.
          enum:
          - agent
          - agentless
        username:
          maxLength: 255
          minLength: 1
          type: string
          description: username to access Host
          example: root
        password:
          maxLength: 1024
          minLength: 1
          type: string
          description: password to access Host
          example: password
        availabilityZones:
          type: array
          nullable: true
          items:
            type: string
            maxLength: 64
            minLength: 1
            description: name or uuid of availablity zone
          uniqueItems: true
        initiators:
          type: array
          nullable: true
          description: Initiator of host
          items:
            type: object
            properties:
              portName:
                maxLength: 255
                minLength: 1
                type: string
                description: Host initiator. Set the wwn, iSCSI type of the host whose
                  FC type is set to iqn of the host
                example: 20000024ff5bb888
              protocol:
                type: string
                description: Initiator type FC or iSCSI
                example: iscsi
                enum:
                - iscsi
                - fibre_channel
                - nvmeof
      description: Host is a consumer of volume from storage.

    HostUpdateSpec:
      type: object
      properties:
        hostName:
          type: string
          minLength: 1
          maxLength: 64
          pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'
          description: Only numbers, letters, '-', '.' in ASCII characters are allowed.
          example: opensds-node1
        ip:
          type: string
          description: IP address of the host, mandatory
          pattern: "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
          example: 8.8.8.8
        port:
          maximum: 65535
          minimum: 1
          type: integer
          description: Host access port
          format: int32
          example: 22
        accessMode:
          type: string
          description: The way to access host, system will access host to get more information and install agent if accessMode is 'agent'. 'port', 'username'and 'password' are requried in 'agent' mode.
          enum:
          - agent
          - agentless
        username:
          maxLength: 255
          minLength: 1
          type: string
          description: username to access Host
          example: root
        password:
          maxLength: 1024
          minLength: 1
          type: string
          description: password to access Host
          example: password
        availabilityZones:
          type: array
          nullable: true
          items:
            type: string
            maxLength: 64
            minLength: 1
            description: name or uuid of availablity zone
          uniqueItems: true
        initiators:
          type: array
          nullable: true
          description: Initiator of host
          items:
            type: object
            properties:
              portName:
                maxLength: 255
                minLength: 1
                type: string
                description: Host initiator. Set the wwn, iSCSI type of the host whose
                  FC type is set to iqn of the host
                example: 20000024ff5bb888
              protocol:
                type: string
                description: Initiator type FC or iSCSI
                example: iscsi
                enum:
                - iscsi
                - fibre_channel
                - nvmeof
      description: Host is a consumer of volume from storage.
    HostRespSpec:
      allOf:
      - $ref: '#/components/schemas/BaseModel'
      - type: object
        properties:
          id:
            type: string
          tenantId:
            type: string
          hostName:
            type: string
          osType:
            type: string
          accessMode:
            type: string
          ip:
            type: string
          port:
            type: string
          username:
            type: string
          availabilityZones:
            type: array
            items:
              type: string
          initiators:
            type: array
            items:
              type: object
              properties:
                portName:
                  type: string
                  example: 20000024ff5bb888
                protocol:
                  type: string
                  example: iscsi
                  enum:
                  - iscsi
                  - fibre_channel
                  - nvmeof

      description: Host is a consumer of volume from storage.
    MetricSpec:
      description: >-
        Metric spec represents metrics of different type, which has name, instanceID label, timestamp , value etc..
      allOf:
        - $ref: '#/components/schemas/BaseModel'
        - type: object
          required:
            - name
          properties:
            instanceID:
              type: string
              readOnly: true
            instanceName:
              type: string
              readOnly: true
            job:
              type: string
            name:
              type: string
              default: default
            unit:
              type: string
              readOnly: true
            aggrType:
              type: string
            metricValues:
              type: array
              description: Metric values for the timestamp
              items:
                type: object
                properties:
                  timestamp:
                    type: integer
                    format: int64
                    description: Timestamp of the metric
                    example: 1575363783
                  value:
                    type: number
                    description: Value of the metric for this timestamp
                    example: 16.74
            labels:
              type: object
              additionalProperties:
                type: string
              example:
                key1: value1
                key2: value2
    CollectMetricSpec:
      description: >-
        Collect Metric spec specifies the driver to trigger collect metrics action.
      allOf:
        - type: object
          required:
            - driverType
          properties:
            driverType:
              type: string
              enum:
                - lvm
                - ceph
                - huawei_oceanstor_block
    UrlSpec:
      description: >-
        Lists information for all url which can be used to access telemetry related services like grafana and alert manager.
      type: object
      required:
        - name
        - url
        - desc
      properties:
        name:
          type: string
          example: Grafana
        url:
          type: string
          example: http://localhost:3000
        desc:
          type: string
          example: Open Grafana tool to visualize collected metric