scitran/core

View on GitHub
swagger/paths/collections.yaml

Summary

Maintainability
Test Coverage
# Global template arguments for collection
$template_arguments:
  resource: collection
  tag: collections
  parameter: CollectionId

/collections:
  get:
    summary: List all collections.
    operationId: get_all_collections
    tags: 
    - collections
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/collection-list.json
        examples:
          response:
            $ref: examples/output/collection-list.json
  post:
    summary: Create a collection
    operationId: add_collection
    tags: 
    - collections
    parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: schemas/input/collection.json
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/collection-new.json
        examples:
          response:
            $ref: examples/output/collection-new.json
      '400':
        $ref: '#/responses/400:invalid-body-json'

/collections/curators:
  get:
    summary: List all curators of collections
    operationId: get_all_collections_curators
    tags: 
    - collections
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/collection-curators-list.json
        examples:
          response:
            $ref: examples/output/collection-curators-list.json
            
/collections/{CollectionId}:
  parameters:
    - required: true
      type: string
      in: path
      name: CollectionId
  get:
    summary: Retrieve a single collection
    operationId: get_collection
    tags: 
    - collections
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/collection.json
        examples:
          response:
            $ref: examples/output/collection.json
  put:
    summary: Update a collection and its contents
    operationId: modify_collection
    tags: 
    - collections
    parameters:
      - name: body
        in: body
        required: true
        schema:
          $ref: schemas/input/collection-update.json
    responses:
      '200':
        description: Collection updated
      '400':
        $ref: '#/responses/400:invalid-body-json'
  delete:
    summary: Delete a collection
    operationId: delete_collection
    tags: 
    - collections
    responses:
      '200':
        description: Collection was deleted

/collections/{CollectionId}/info:
  $template: templates/container-item-info.yaml

/collections/{CollectionId}/sessions:
  parameters:
    - required: true
      type: string
      in: path
      name: CollectionId
  get:
    summary: List sessions in a collection
    operationId: get_collection_sessions
    tags: 
    - collections
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/session-list.json
        examples:
          response:
            $ref: examples/output/session-list.json

/collections/{CollectionId}/acquisitions:
  parameters:
    - name: CollectionId
      in: path
      type: string      
      required: true
    - name: session
      in: query
      type: string
      description: The id of a session, to which the acquisitions returned will be restricted
  get:
    summary: List acquisitions in a collection
    operationId: get_collection_acquisitions
    tags: 
    - collections
    responses:
      '200':
        description: ''
        schema:
          $ref: schemas/output/acquisition-list.json
        examples:
          response:
            $ref: examples/output/acquisition-list.json

# ===== Tags =====
/collections/{CollectionId}/tags:
  $template: templates/tags.yaml
/collections/{CollectionId}/tags/{TagValue}:
  $template: templates/tags-tag.yaml

# ===== Files =====
/collections/{CollectionId}/files:
  $template: templates/file-list-upload.yaml
/collections/{CollectionId}/files/{FileName}:
  $template: templates/file-item.yaml

# ===== Permissions =====
/collections/{CollectionId}/permissions:
  $template: templates/permissions.yaml
/collections/{CollectionId}/permissions/{UserId}:
  $template: templates/permissions-user.yaml
/collections/{CollectionId}/files/{FileName}/info:
  $template: templates/file-item-info.yaml

# ===== Notes =====
/collections/{CollectionId}/notes:
  $template: templates/notes.yaml
/collections/{CollectionId}/notes/{NoteId}:
  $template: templates/notes-note.yaml

# ===== Analyses =====
/collections/{CollectionId}/analyses:
  $template: templates/analyses-list.yaml
  arguments:
    allowCreate: true
/collections/{CollectionId}/analyses/{AnalysisId}:
  $template: templates/analysis-item.yaml
  arguments:
    supportsDelete: true
/collections/{CollectionId}/analyses/{AnalysisId}/inputs:
  $template: templates/analysis-files.yaml
  arguments:
    filegroup: inputs
/collections/{CollectionId}/analyses/{AnalysisId}/inputs/{Filename}:
  $template: templates/analysis-files-create-ticket-filename.yaml
  arguments:
    filegroup: inputs
/collections/{CollectionId}/analyses/{AnalysisId}/files:
  $template: templates/analysis-files.yaml
  arguments:
    filegroup: outputs
/collections/{CollectionId}/analyses/{AnalysisId}/files/{Filename}:
  $template: templates/analysis-files-create-ticket-filename.yaml
  arguments:
    filegroup: outputs
/collections/{CollectionId}/analyses/{AnalysisId}/notes:
  $template: templates/analysis-notes.yaml
/collections/{CollectionId}/analyses/{AnalysisId}/notes/{NoteId}:
  $template: templates/analysis-notes-item.yaml