openapi: 3.0.0
# Added by API Auto Mocking Plugin
servers:
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/Vuframe/CDN/1.0.0
  - url: https://cdn.vuframe.com
    description: Production server
info:
  description: Request files from the Vuframe® platform via the CDN API.
  version: "1.0.0"
  title: Vuframe® CDN
  contact:
    email: andreas.zeitler@vuframe.com
    name: Andreas Zeitler
  termsOfService: https://www.vuframe.com/terms-of-service/
tags:
  - name: clients
    description: Secured calls for Vuframe® app clients.
paths:
  /{token}/item:
    get:
      tags:
        - clients
      summary: download an item
      operationId: downloadItem
      description: |
        Call **/{token}/item** to download a file.

        Content Types:

        * 3D Item
        * Image
        * Movie
        * PDF

        **Warning:** For 3D Items, when no format is passed this defaults to the contents.zip of a legacy Vuframe 3D file.
      parameters:
        - in: path
          name: token
          description: the token of the requested item.
          required: true
          schema:
            type: string
          example: 2f12c4d43743e0bc123c46faf23c196d123466123a67169d
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: redirect
          description: redirect to final download path, instead of serving file directly. setting redirect=1 is highly recommended.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: format
          schema:
            type: string
        - in: query
          name: resolution
          description: 'resolution identifier, if resolution is found will be returned, otherwise raw file. <br> example resolutions: 0k, 1k, 2k, 4k'
          schema:
            type: string
        - in: query
          name: segment
          description: 'index of the segment of the file to be retrieved (currently only
            used for 360 images <br> pass 0 for the left, 1 for the right half of the image)'
          schema:
            type: integer
        - in: query
          name: client
          schema:
            type: string
          example: aura-cli
          description: string identifying the client making this request.
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
      responses:
        '302':
          description: redirect for download
  /{token}/download [DEPRECATED]:
    get:
      tags:
        - clients
      summary: download an item; DEPRECATED, use /{token}/item instead
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
      responses:
        '302':
          description: redirect for download
  /{token}/download_url:
    get:
      tags:
        - clients
      summary: retrieve the download url for an item
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
      responses:
        '200':
          description: download_url and source_properties
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/download_url'
  /{token}/properties:
    get:
      tags:
        - clients
      summary: retrieve properties of item as json
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '200':
          description: search results matching criteria
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/source_properties'
  /{token}/preview:
    get:
      tags:
        - clients
      summary: download preview image (JPG or PNG)
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: redirect
          description: redirect to final download path, instead of serving file directly. setting redirect=1 is highly recommended.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '302':
          description: redirect to preview image
  /{token}/thumb:
    get:
      tags:
        - clients
      summary: download thumbnail image  (JPG)
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: redirect
          description: redirect to final download path, instead of serving file directly. setting redirect=1 is highly recommended.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '302':
          description: redirect to thumbnail image
  /{token}/package:
    get:
      tags:
        - clients
      summary: download items which are streamed by default
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: resolution
          description: 'resolution identifier, if resolution is found will be returned, otherwise raw file. <br> example resolutions: 0k, 1k, 2k, 4k'
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '302':
          description: redirect to package file
  /{token}/raw:
    get:
      tags:
        - clients
      summary: download processed file directly
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
      responses:
        '302':
          description: redirect to processed file
  /{token}/source:
    get:
      description: download source file
      tags:
        - clients
      summary: download the uploaded source of an item
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
      responses:
        '302':
          description: redirect to original, unprocessed file
  /{token}/resource/{resource_name}:
    get:
      tags:
        - clients
      summary: download a resource from within this item
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: path
          name: resource_name
          description: name of the requested resource
          required: true
          schema:
            type: string
        - in: query
          name: ext
          description: the extension of the requested resource, prevents the need for urlencoded resource names (zip, dat, jpg, etc..)
          schema:
            type: string
        - in: query
          name: version
          schema:
            type: integer
            minimum: 1
          description: the specific version of the item, defaults to latest version if not passed
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '302':
          description: redirect to resource file
  /{token}/edge/{resource_name}:
    get:
      tags:
        - clients
      summary: download a resource from within this item
      parameters:
        - in: path
          name: token
          description: the token of the requested item
          required: true
          schema:
            type: string
        - in: path
          name: resource_name
          description: name of the requested resource
          required: true
          schema:
            type: string
        - in: query
          name: ext
          description: the extension of the requested resource, prevents the need for urlencoded resource names (zip, dat, jpg, etc..)
          schema:
            type: string
        - in: query
          name: path
          description: the path leading to the requested resource (e.g. auraweb for AuraWeb data)
          schema:
            type: string
        - in: query
          name: cloudfront
          description: Requesting a Cloudfront presigned url instead of the S3 presigned url.
          schema:
            type: integer
            enum: [0, 1]
            default: 0
        - in: query
          name: inspect
          description: _Admin-only_ instead of executing the request, return a JSON which contains the information of what would be returned.
          schema:
            type: integer
            enum: [0, 1]
            default: 0

      responses:
        '302':
          description: redirect to resource file
components:
  schemas:
    source_properties:
      type: object
      properties:
        guid:
          type: string
          format: uuid
          example: bf1a77aaa42cb9e253965f4e6482463e778e45145a464564
        name:
          type: string
          example: Kitchen-Mixer
        type:
          type: string
          example: cloud_scene
        asset:
          type: string
          example: Mixer
        editor:
          type: string
          example: unity
        layouts:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: root
        version:
          type: string
          example: 7
        features:
          type: array
          items:
            type: string
            example: touch
        surfaces:
          type: array
          items: {}
        triggers:
          type: array
          items: {}
        luminance:
          type: string
          example: 0.42027527135757087
        variations:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: Meshes
              styles:
                type: array
                items: {}
              description:
                type: string
                example:
        api_version:
          type: string
          example: 42
        ar_patterns:
          type: array
          items: {}
        published_at:
          type: string
          example: 01.04.2020 14:23:13
        lighting_type:
          type: string
          example: dynamic
        editor_variant:
          type: string
          example: ios
        editor_version:
          type: string
          example: 2017.4.1f1
        lighting_color:
          type: string
          example: 000
        plugin_version:
          type: string
          example: 23
        main_ar_pattern:
          type: string
          example:
        background_color:
          type: string
          format: nullable
        external_objects:
          type: array
          items: {}
        external_textures:
          type: array
          items: {}
        external_materials:
          type: array
          items: {}
        lighting_direction:
          type: string
          example: (000000)
        lighting_intensity:
          type: string
          example: 0
        augmented_middleware:
          type: string
          example: wikitude
        additional_formats:
          type: object
          properties: {}
    download_url:
      type: object
      properties:
        guid:
          type: string
          format: uuid
          example: bf1a77aaa42cb9e253965f4e6482463e778e45145a464564
        name:
          type: string
          example: Kitchen-Mixer
        type:
          type: string
          example: cloud_scene
        asset:
          type: string
          example: Mixer
        editor:
          type: string
          example: unity
        layouts:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: root
        version:
          type: string
          example: 7
        features:
          type: array
          items:
            type: string
            example: touch
        surfaces:
          type: array
          items: {}
        triggers:
          type: array
          items: {}
        luminance:
          type: string
          example: 0.42027527135757087
        variations:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: Meshes
              styles:
                type: array
                items: {}
              description:
                type: string
                example:
        api_version:
          type: string
          example: 42
        ar_patterns:
          type: array
          items: {}
        published_at:
          type: string
          example: 01.04.2020 14:23:13
        lighting_type:
          type: string
          example: dynamic
        editor_variant:
          type: string
          example: ios
        editor_version:
          type: string
          example: 2017.4.1f1
        lighting_color:
          type: string
          example: 000
        plugin_version:
          type: string
          example: 23
        main_ar_pattern:
          type: string
          example:
        background_color:
          type: string
          format: nullable
        external_objects:
          type: array
          items: {}
        external_textures:
          type: array
          items: {}
        external_materials:
          type: array
          items: {}
        lighting_direction:
          type: string
          example: (000000)
        lighting_intensity:
          type: string
          example: 0
        augmented_middleware:
          type: string
          example: wikitude
        additional_formats:
          type: object
          properties: {}
        url:
          type: string
          example: https://cdn.vuframe.com/...
        thumb:
          type: string
          example: https://cdn.vuframe.com/...
externalDocs:
  description: Vuframe® Docs
  url: https://vuframe.com/docs/