openapi: 3.0.0
info:
  license:
    name: MIT
    url: https://github.com/aziontech/azionapi-openapi/blob/main/LICENSE.md
  title: Storage API
  version: 1.0.0
servers:
- description: Production
  url: https://storage-api.azion.com
security:
- tokenAuth: []
paths:
  /storage/{version_id}:
    post:
      description: Upload file and transfer to remote storage
      parameters:
      - description: "The content type of the file (Example: text/plain)."
        explode: false
        in: header
        name: Content-Type
        required: false
        schema:
          default: b2/x-auto
          type: string
        style: simple
      - description: "Required in order to get the path and file name. i.e.: assets/css/main.css"
        explode: false
        in: header
        name: X-Azion-Static-Path
        required: true
        schema:
          type: string
        style: simple
      - description: ""
        explode: false
        in: path
        name: version_id
        required: true
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/octet-stream:
            schema:
              format: binary
              type: string
      responses:
        "201":
          content:
            application/json:
              schema: {}
          description: ""
        "400":
          description: Bad request
        "404":
          content:
            application/json:
              schema: {}
          description: Resource not found
      summary: /storage/:version_id
  /storage/{version_id}/delete:
    delete:
      description: Delete a version. A version is just um path prefix/sub-namespace
        for a set of files.
      operationId: deleteVersion
      parameters:
      - description: The version identifier
        explode: false
        in: path
        name: version_id
        required: true
        schema:
          type: string
        style: simple
      responses:
        "204":
          description: The resource was deleted successfully.
        "400":
          description: Bad request
        "404":
          content:
            application/json:
              schema: {}
          description: Resource not found
      summary: /storage/:version_id/delete
components:
  responses:
    "401":
      content:
        application/json:
          schema:
            properties:
              detail:
                type: string
            type: object
      description: Token/Personal Token has been expired or invalid
  schemas: {}
  securitySchemes:
    tokenAuth:
      description: |
        You must inform a token to auth.
        Usage format: `Token <TOKEN>`
      in: header
      name: Authorization
      type: apiKey
