scitran/core

View on GitHub
swagger/paths/engine.yaml

Summary

Maintainability
Test Coverage
/engine:
  post:
    summary: Upload a list of file fields.
    description: |
      ### Default behavior:
       >Uploads a list of file fields sent as file1, file2, etc to an existing
        container and updates fields of the files, the container and it's
        parents as specified in the metadata fileformfield using the
        engine placer class

      ### When ``level`` is ``analysis``:
      > Uploads a list of files to an existing analysis object, marking
        all files as ``output=true`` using the job-based analyses placer
        class.  See schemas/input/analysis.json
    operationId: engine_upload
    responses:
      '200':
        description: A list of FileInfo objects
        schema:
          example:
            $ref: examples/file_info_list.json
    parameters:
      - in: body
        name: body
        description: >
          Object encoded as a JSON string.

          By default JSON must match the specified enginemetadata.json schema

          If ``level`` is ``analysis``, JSON must match AnalysisUploadMetadata schema
        schema:
          $ref: schemas/input/enginemetadata.json
      - required: true
        description: Which level to store files in
        enum:
          - project
          - session
          - acquisition
          - analysis
        type: string
        in: query
        name: level
      - required: true
        description: The ID of the container to place files in
        type: string
        in: query
        name: id
      - description: Required if ``level`` is ``analysis``
        type: string
        in: query
        name: job
        required: true