Microsoft Azure File Storage

Microsoft Azure File Storage is a cloud-based storage service that allows users to store and access their files from anywhere in the world. It provides a secure and scalable solution for organizations to store their files, share them with other users, and easily access them from any device. Users can store a wide variety of file types, including documents, images, videos, and more.

OpenAPI Specification

azure-file-storage-openapi-original.yml Raw ↑
swagger: '2.0'
info:
  title: Microsoft Azure Azure File Storage
  version: '2024-05-04'
  x-ms-code-generation-settings:
    header: MIT
    strictSpecAdherence: false
x-ms-parameterized-host:
  hostTemplate: '{url}'
  useSchemePrefix: false
  positionInOperation: first
  parameters:
    - $ref: '#/parameters/Url'
securityDefinitions:
  File_shared_key:
    type: apiKey
    name: Authorization
    in: header
schemes:
  - https
consumes:
  - application/xml
produces:
  - application/xml
paths: {}
x-ms-paths:
  /?restype=service&comp=properties:
    put:
      tags:
        - service
      operationId: Service_SetProperties
      description: >-
        Sets properties for a storage account's File service endpoint, including
        properties for Storage Analytics metrics and CORS (Cross-Origin Resource
        Sharing) rules.
      parameters:
        - $ref: '#/parameters/StorageServiceProperties'
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '202':
          description: Success (Accepted)
          headers:
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    get:
      tags:
        - service
      operationId: Service_GetProperties
      description: >-
        Gets the properties of a storage account's File service, including
        properties for Storage Analytics metrics and CORS (Cross-Origin Resource
        Sharing) rules.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success.
          headers:
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
          schema:
            $ref: '#/definitions/StorageServiceProperties'
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - service
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - properties
  /?comp=list:
    get:
      tags:
        - service
      operationId: Service_ListSharesSegment
      description: >-
        The List Shares Segment operation returns a list of the shares and share
        snapshots under the specified account.
      parameters:
        - $ref: '#/parameters/Prefix'
        - $ref: '#/parameters/Marker'
        - $ref: '#/parameters/MaxResults'
        - $ref: '#/parameters/ListSharesInclude'
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success.
          headers:
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
          schema:
            $ref: '#/definitions/ListSharesResponse'
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
      x-ms-pageable:
        nextLinkName: NextMarker
    parameters:
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - list
  /{shareName}?restype=share:
    put:
      tags:
        - share
      operationId: Share_Create
      description: >-
        Creates a new share under the specified account. If the share with the
        same name already exists, the operation fails.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/Metadata'
        - $ref: '#/parameters/ShareQuota'
        - $ref: '#/parameters/AccessTierOptional'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ShareEnabledProtocols'
        - $ref: '#/parameters/ShareRootSquash'
      responses:
        '201':
          description: Success, Share created.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value which represents the version of the
                share, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties or metadata
                updates the last modified time. Operations on files do not
                affect the last modified time of the share.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                A UTC date/time value generated by the service that indicates
                the time at which the response was initiated.
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    get:
      tags:
        - share
      operationId: Share_GetProperties
      description: >-
        Returns all user-defined metadata and system properties for the
        specified share or share snapshot. The data returned does not include
        the share's list of files.
      parameters:
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/LeaseIdOptional'
      responses:
        '200':
          description: Success
          headers:
            x-ms-meta:
              type: string
              description: >-
                A set of name-value pairs that contain the user-defined metadata
                of the share.
              x-ms-client-name: Metadata
              x-ms-header-collection-prefix: x-ms-meta-
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                A UTC date/time value generated by the service that indicates
                the time at which the response was initiated.
            x-ms-share-quota:
              x-ms-client-name: Quota
              type: integer
              description: Returns the current share quota in GB.
            x-ms-share-provisioned-iops:
              x-ms-client-name: ProvisionedIops
              type: integer
              description: Returns the current share provisioned ipos.
            x-ms-share-provisioned-ingress-mbps:
              x-ms-client-name: ProvisionedIngressMBps
              type: integer
              description: >-
                Returns the current share provisioned ingress in megabytes per
                second.
            x-ms-share-provisioned-egress-mbps:
              x-ms-client-name: ProvisionedEgressMBps
              type: integer
              description: >-
                Returns the current share provisioned egress in megabytes per
                second.
            x-ms-share-next-allowed-quota-downgrade-time:
              x-ms-client-name: NextAllowedQuotaDowngradeTime
              type: string
              format: date-time-rfc1123
              description: Returns the current share next allowed quota downgrade time.
            x-ms-share-provisioned-bandwidth-mibps:
              x-ms-client-name: ProvisionedBandwidthMibps
              type: integer
              description: >-
                Returns the current share provisioned bandwidth in megabits per
                second.
            x-ms-lease-duration:
              x-ms-client-name: LeaseDuration
              description: >-
                When a share is leased, specifies whether the lease is of
                infinite or fixed duration.
              type: string
              enum:
                - infinite
                - fixed
              x-ms-enum:
                name: LeaseDurationType
                modelAsString: false
            x-ms-lease-state:
              x-ms-client-name: LeaseState
              description: Lease state of the share.
              type: string
              enum:
                - available
                - leased
                - expired
                - breaking
                - broken
              x-ms-enum:
                name: LeaseStateType
                modelAsString: false
            x-ms-lease-status:
              x-ms-client-name: LeaseStatus
              description: The current lease status of the share.
              type: string
              enum:
                - locked
                - unlocked
              x-ms-enum:
                name: LeaseStatusType
                modelAsString: false
            x-ms-access-tier:
              x-ms-client-name: AccessTier
              type: string
              description: Returns the access tier set on the share.
            x-ms-access-tier-change-time:
              x-ms-client-name: AccessTierChangeTime
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the last modified time (in UTC) of the access tier of
                the share.
            x-ms-access-tier-transition-state:
              x-ms-client-name: AccessTierTransitionState
              type: string
              description: Returns the transition state between access tiers, when present.
            x-ms-enabled-protocols:
              x-ms-client-name: EnabledProtocols
              description: The protocols that have been enabled on the share.
              type: string
            x-ms-root-squash:
              x-ms-client-name: RootSquash
              description: Valid for NFS shares only.
              type: string
              enum:
                - NoRootSquash
                - RootSquash
                - AllSquash
              x-ms-enum:
                name: ShareRootSquash
                modelAsString: false
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    delete:
      tags:
        - share
      operationId: Share_Delete
      description: >-
        Operation marks the specified share or share snapshot for deletion. The
        share or share snapshot and any files contained within it are later
        deleted during garbage collection.
      parameters:
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/DeleteSnapshots'
        - $ref: '#/parameters/LeaseIdOptional'
      responses:
        '202':
          description: Accepted
          headers:
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                A UTC date/time value generated by the service that indicates
                the time at which the response was initiated.
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=lease&acquire:
    put:
      tags:
        - share
      operationId: Share_AcquireLease
      description: >-
        The Lease Share operation establishes and manages a lock on a share, or
        the specified snapshot for set and delete share operations.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/LeaseDuration'
        - $ref: '#/parameters/ProposedLeaseIdOptional'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/ClientRequestId'
      responses:
        '201':
          description: The Acquire operation completed successfully.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-lease-id:
              x-ms-client-name: LeaseId
              type: string
              description: Uniquely identifies a share's lease
            x-ms-client-request-id:
              x-ms-client-name: ClientRequestId
              type: string
              description: >-
                If a client request id header is sent in the request, this
                header will be present in the response with the same value.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                UTC date/time value generated by the service that indicates the
                time at which the response was initiated
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - lease
      - name: x-ms-lease-action
        x-ms-client-name: action
        in: header
        required: true
        type: string
        enum:
          - acquire
        x-ms-enum:
          name: LeaseAction
          modelAsString: false
        x-ms-parameter-location: method
        description: Describes what lease action to take.
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=lease&release:
    put:
      tags:
        - share
      operationId: Share_ReleaseLease
      description: >-
        The Lease Share operation establishes and manages a lock on a share, or
        the specified snapshot for set and delete share operations.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/LeaseIdRequired'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/ClientRequestId'
      responses:
        '200':
          description: The Release operation completed successfully.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-client-request-id:
              x-ms-client-name: ClientRequestId
              type: string
              description: >-
                If a client request id header is sent in the request, this
                header will be present in the response with the same value.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                UTC date/time value generated by the service that indicates the
                time at which the response was initiated
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - lease
      - name: x-ms-lease-action
        x-ms-client-name: action
        in: header
        required: true
        type: string
        enum:
          - release
        x-ms-enum:
          name: LeaseAction
          modelAsString: false
        x-ms-parameter-location: method
        description: Describes what lease action to take.
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=lease&change:
    put:
      tags:
        - share
      operationId: Share_ChangeLease
      description: >-
        The Lease Share operation establishes and manages a lock on a share, or
        the specified snapshot for set and delete share operations.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/LeaseIdRequired'
        - $ref: '#/parameters/ProposedLeaseIdOptional'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/ClientRequestId'
      responses:
        '200':
          description: The Change operation completed successfully.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-lease-id:
              x-ms-client-name: LeaseId
              type: string
              description: Uniquely identifies a share's lease
            x-ms-client-request-id:
              x-ms-client-name: ClientRequestId
              type: string
              description: >-
                If a client request id header is sent in the request, this
                header will be present in the response with the same value.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                UTC date/time value generated by the service that indicates the
                time at which the response was initiated
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - lease
      - name: x-ms-lease-action
        x-ms-client-name: action
        in: header
        required: true
        type: string
        enum:
          - change
        x-ms-enum:
          name: LeaseAction
          modelAsString: false
        x-ms-parameter-location: method
        description: Describes what lease action to take.
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=lease&renew:
    put:
      tags:
        - share
      operationId: Share_RenewLease
      description: >-
        The Lease Share operation establishes and manages a lock on a share, or
        the specified snapshot for set and delete share operations.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/LeaseIdRequired'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ShareSnapshot'
        - $ref: '#/parameters/ClientRequestId'
      responses:
        '200':
          description: The Renew operation completed successfully.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-lease-id:
              x-ms-client-name: LeaseId
              type: string
              description: Uniquely identifies a share's lease
            x-ms-client-request-id:
              x-ms-client-name: ClientRequestId
              type: string
              description: >-
                If a client request id header is sent in the request, this
                header will be present in the response with the same value.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: Returns the current share next allowed quota downgrade time.
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - lease
      - name: x-ms-lease-action
        x-ms-client-name: action
        in: header
        required: true
        type: string
        enum:
          - renew
        x-ms-enum:
          name: LeaseAction
          modelAsString: false
        x-ms-parameter-location: method
        description: Describes what lease action to take.
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=lease&break:
    put:
      tags:
        - share
      operationId: Share_BreakLease
      description: >-
        The Lease Share operation establishes and manages a lock on a share, or
        the specified snapshot for set and delete share operations.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/LeaseBreakPeriod'
        - $ref: '#/parameters/LeaseIdOptional'
        - $ref: '#/parameters/ApiVersionParameter'
        - $ref: '#/parameters/ClientRequestId'
        - $ref: '#/parameters/ShareSnapshot'
      responses:
        '202':
          description: The Break operation completed successfully.
          headers:
            ETag:
              type: string
              description: >-
                The ETag contains a value that you can use to perform operations
                conditionally, in quotes.
            Last-Modified:
              type: string
              format: date-time-rfc1123
              description: >-
                Returns the date and time the share was last modified. Any
                operation that modifies the share or its properties updates the
                last modified time. Operations on files do not affect the last
                modified time of the share.
            x-ms-lease-time:
              x-ms-client-name: LeaseTime
              type: integer
              description: Approximate time remaining in the lease period, in seconds.
            x-ms-lease-id:
              x-ms-client-name: LeaseId
              type: string
              description: Uniquely identifies a share's lease
            x-ms-client-request-id:
              x-ms-client-name: ClientRequestId
              type: string
              description: >-
                If a client request id header is sent in the request, this
                header will be present in the response with the same value.
            x-ms-request-id:
              x-ms-client-name: RequestId
              type: string
              description: >-
                This header uniquely identifies the request that was made and
                can be used for troubleshooting the request.
            x-ms-version:
              x-ms-client-name: Version
              type: string
              description: >-
                Indicates the version of the File service used to execute the
                request.
            Date:
              type: string
              format: date-time-rfc1123
              description: >-
                UTC date/time value generated by the service that indicates the
                time at which the response was initiated
        default:
          description: Failure
          headers:
            x-ms-error-code:
              x-ms-client-name: ErrorCode
              type: string
          schema:
            $ref: '#/definitions/StorageError'
    parameters:
      - $ref: '#/parameters/ShareName'
      - name: comp
        description: comp
        in: query
        required: true
        type: string
        enum:
          - lease
      - name: x-ms-lease-action
        x-ms-client-name: action
        in: header
        required: true
        type: string
        enum:
          - break
        x-ms-enum:
          name: LeaseAction
          modelAsString: false
        x-ms-parameter-location: method
        description: Describes what lease action to take.
      - name: restype
        description: restype
        in: query
        required: true
        type: string
        enum:
          - share
  /{shareName}?restype=share&comp=snapshot:
    put:
      tags:
        - share
      operationId: Share_CreateSnapshot
      description: Creates a read-only snapshot of a share.
      parameters:
        - $ref: '#/parameters/Timeout'
        - $ref: '#/parameters/Metadata'
        - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '201':
          description: Success, Share snapshot created.
          headers:
            x-ms-snapshot:
              x-ms-client-name: Snapshot
              type: 

# --- truncated at 32 KB (207 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/microsoft-azure/refs/heads/main/openapi/azure-file-storage-openapi-original.yml