openapi: 3.0.0
info:
  version: '1.0.0'
  title: Aura 3D™ Model & Pipeline API
  description: 'Upload & manage models, materials – schedule tasks and pipeline runs.'
tags:
  - name: workspaces
    description: access to the user's workspaces
  - name: models
    description: access to the user's models
  - name: model revisions
    description: revisions are new versions of model source files (which are created via the /uploads endpoint), when uploading a new revision the properties of the model are applied to it
  - name: model processing
    description: processing of models
paths:
  /workspaces/:
    get:
      summary: retrieve all workspaces of the authenticated user
      tags: [ 'workspaces' ]
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  test:
                    type: string
                    description: test
              
  /workspaces/{workspace_token}:
    get:
      summary: retrieve the details for the specified workspace
      tags: [ 'workspaces' ]
      parameters: 
        - in: path
          name: workspace_token
          description: the token identifying the workspace
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/models/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieve all models
      tags: [ 'models' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/models/{token}:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieve the details for a specific model
      tags: [ 'models' ]
      responses:
        '200':
          description: success
    patch:
      summary: update a specific model
      tags: [ 'models' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/models/{token}/formats:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieve the available formats for a model
      tags: [ 'model formats' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/models/{token}/tasks/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieve the tasks for the model
      tags: [ 'model processing' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/models/{token}/runs/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieve the pipeline runs for the model
      tags: [ 'model processing' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/uploads/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieves all uploads in the specified workspace
      tags: [ 'uploads' ]
      responses:
        '200':
          description: success
    post:
      summary: creates a new upload
      tags: [ 'uploads' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/uploads/{upload_token}:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: upload_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieves the upload details of the specified upload
      tags: [ 'uploads' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/uploads/{upload_token}/complete/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: upload_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    post:
      summary: completes the upload
      tags: [ 'uploads' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/textures/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieves all textures in the workspace
      tags: [ 'textures' ]
      responses:
        '200':
          description: success
    post:
      summary: creates a new texture in the workspace
      tags: [ 'textures' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/textures/{texture_token}/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: texture_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    patch:
      summary: updates a texture in the workspace
      tags: [ 'textures' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/materials/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieves all materials in the workspace
      tags: [ 'materials' ]
      responses:
        '200':
          description: success
    post:
      summary: creates a new material in the workspace
      tags: [ 'materials' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/materials/{material_token}/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
      - in: path
        name: material_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    patch:
      summary: updates a material in the workspace
      tags: [ 'materials' ]
      responses:
        '200':
          description: success
  /workspaces/{workspace_token}/pipelines/:
    parameters: 
      - in: path
        name: workspace_token
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: retrieves all pipeline definitions in the workspace
      tags: [ 'pipelines' ]
      responses:
        '200':
          description: success
  /pipeline/tasks/:
    get:
      summary: get all tasks
      tags: [ 'tasks' ]
      responses:
        '200':
          description: success
    post:
      summary: create a new task
      tags: [ 'tasks' ]
      responses:
        '200':
          description: success
  /pipeline/tasks/{id}/:
    parameters: 
      - in: path
        name: id
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: get the details of the task with id
      tags: [ 'tasks' ]
      responses:
        '200':
          description: success
  /pipeline/runs/:
    get:
      summary: get all pipeline runs
      tags: [ 'pipeline runs' ]
      responses:
        '200':
          description: success
  /pipeline/runs/{id}/:
    parameters: 
      - in: path
        name: id
        description: the token identifying the workspace
        required: true
        schema:
          type: string
    get:
      summary: get the details of the run with id
      tags: [ 'pipeline runs' ]
      responses:
        '200':
          description: success
  /pipeline/actions/:
    get:
      summary: list all available actions
      tags: [ 'actions' ]
      responses:
        '200':
          description: success
servers:
  - description: Production Aura 3D™ API
    url: https://api.aura3d.io/v1
  - description: Studio-internal API endpoint
    url: https://www.vuframe.studio/api/aura/v1
  # Added by API Auto Mocking Plugin
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/Vuframe/Aura2/1.0
components:
  schemas:
    Task:
      type: object
      properties:
        id:
          type: integer
          format: int64
      description: A task is a self-contained operation that processes an Action with a given input file and config params.