---
title: "Create a fileshare."
method: POST
path: "/v1/{tenantId}/file/shares"
tags: ["FileShare"]
---

# Create a fileshare.

`POST /v1/{tenantId}/file/shares`

## Request

- Base URL: `https://virtserver.swaggerhub.com/open83/multi-cloud/1.0.0`
- URL: `https://virtserver.swaggerhub.com/open83/multi-cloud/1.0.0/v1/{tenantId}/file/shares`
- Auth: none declared

## Request body

- FileShare
  - `Id` string: The fileshare ID, - Optional
  - `UserId` string: The user UUID in a multi-tenancy environment, - Optional
  - `BackendId` string, required: The backend ID, - Required
  - `Backend` string: The backend Name, - Optional
  - `Name` string, required: The fileshare name specified by user, - Required
  - `Description` string: The fileshare name specified by user, - Optional
  - `Type` string: The fileshare type, - Optional
  - `Size` integer: The fileshare size, - Optional
  - `Region` string: The region for the fileshare, - Optional
  - `AvailabilityZone` string: The availability zone for the fileshare, - Optional
  - `Protocols` 'NFS' | 'SMB': The fileshare supported protocols, - Optional
  - `Tags` Tag[]: The fileshare tags, - Optional
    - `key` string: Key of the Tag object.
    - `Value` string: Value of the Tag object.
  - `SnapshotId` string: The fileshare snapshot id, - Optional
  - `Encrypted` boolean: Flag for encryted fileshare, - Optional
  - `EncryptedSettings` object: Encryted fileshare Keys, - Optional
  - `Metadata` object, required: Metadata for cloud backend specific data, - Required

## Response `200`

successful operation

- FileShareResult: FileShare Response
  - `Id` string: The fileshare ID, generated by server
  - `CreatedAt` string: The time of creation of the fileshare.
  - `UpdatedAt` string: The time at which the fileshare was updated.
  - `TenantId` string: The tenant UUID in a multi-tenancy environment.
  - `UserId` string: The user UUID in a multi-tenancy environment.
  - `BackendId` string: The backend ID
  - `Backend` string: The backend Name.
  - `Name` string: The fileshare name specified by user.
  - `Description` string: The fileshare description specified by user.
  - `Type` string: The fileshare type.
  - `Size` integer: The fileshare size.
  - `Region` string: The region for the fileshare.
  - `AvailabilityZone` string: The availability zone for the fileshare.
  - `Status` 'available' | 'creating' | 'inUse' | 'error' | 'updating' | 'deleting' | 'errorDeleting' | 'deleted': The fileshare status.
  - `Protocols` 'NFS' | 'SMB': The fileshare supported protocols.
  - `Tags` Tag[]
    - `key` string: Key of the Tag object.
    - `Value` string: Value of the Tag object.
  - `SnapshotId` string: The fileshare snapshot id.
  - `Encrypted` boolean: Flag for encryted fileshare.
  - `EncryptedSettings` object: Encryted fileshare Keys.
  - `Metadata` object
    - `fields` Fields
      - `CreationTimeAtBackend` object
        - `kind` object
          - `StringValue` string
      - `CreationToken` object
        - `kind` object
          - `StringValue` string
      - `FileSystemId` object
        - `kind` object
          - `StringValue` string
      - `FileSystemSize` object
        - `kind` object
          - `StructValue` object
            - `fields` object
              - …
      - `LifeCycleState` object
        - `kind` object
          - `StringValue` 'creating' | 'available' | 'updating' | 'deleting' | 'deleted'
      - `Name` object
        - `kind` object
          - `StringValue` string
      - `NumberOfMountTargets` object
        - `kind` object
          - `NumberValue` integer
      - `OwnerId` object
        - `kind` object
          - `StringValue` string
      - `PerformanceMode` object
        - `kind` object
          - `StringValue` 'generalPurpose' | 'maxIO'
      - `ProvisionedThroughputInMibps` object
        - `kind` object
          - `NumberValue` integer
      - `ThroughputMode` object
        - `kind` object
          - `StringValue` 'bursting' | 'provisioned'

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Token not found in header
- `415`: Unsupported Media Type

## Changes

> 33 revisions in range; 3 not diffed.

- **2020-08-29** `7299be026d62`: 12 breaking, 12 warning, 7 info
  - request property `Protocols` was restricted to a list of enum values
  - the request property `BackendId` became required
  - the request property `Metadata` became required
  - the request property `Name` became required
  - …27 more
- **2020-08-29** `443f565555ae`: 10 breaking, 5 warning, 15 info
  - removed the enum value `NFS` of the request property `Protocols`
  - removed the enum value `SMB` of the request property `Protocols`
  - the `EncryptedSettings` request property type changed from `object` to `string`
  - the `Metadata` request property type changed from `object` to `string`
  - …26 more
- **2020-06-28** `7bc48776926e`: 1 info
  - endpoint added
- **2018-10-29** `50fa096a3906`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/sodafoundation/apis/soda-multi-cloud-api/changes/v1/:tenantId/file/shares/post.md)

---

[API](https://skmtc.dev/sodafoundation/apis/soda-multi-cloud-api.md) - [All operations](https://skmtc.dev/sodafoundation/apis/soda-multi-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sodafoundation/apis/soda-multi-cloud-api/revisions/df048c8349b6?raw)
