Skip to content
Snippets Groups Projects
projects.raml 2.54 KiB
Newer Older
type: container
get:
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/output/project-list.json
          schema: !include ../schemas/output/project-list.json
post:
  description: Create a project
  body:
    application/json:
      example: !include ../examples/input/project.json
      schema: !include ../schemas/input/project.json
/{ProjectId}:
  type: container-item
  get:
    responses:
      200:
        body:
          application/json:
            example: !include ../examples/output/project.json
            schema: !include ../schemas/output/project.json
  put:
    body:
      application/json:
        example: !include ../examples/input/project-update.json
        schema: !include ../schemas/input/project-update.json
        /{ProjectId}/template:
          uriParameters:
            ProjectId:
              type: string
              required: true
          post:
            description: Set the session template for a project
            body:
              application/json:
                example: !include ../examples/input/project-template.json
                schema: !include ../schemas/input/project-template.json
            responses:
              200:
                description: Template was saved
                body:
                  application/json:
                    example: |
                      {"modified": 1}
              404:
                description: Project was not found
  /recalc:
    uriParameters:
      ProjectId:
        type: string
        required: true
    post:
      description: |
        Recalculate if sessions in the project satisfy the template.
        Returns list of modified session ids.
      responses:
        200:
          description: |
            Project's sessions' compliance was recalculated.
            Returns list of session that were modified.
        404:
          description: Project was not found
Megan Henning's avatar
Megan Henning committed
  delete:
    description: Remove the session template for a project
    responses:
      200:
        description: Template was removed
        body:
          application/json:
            example: |
              {"modified": 1}
      404:
        description: Project was not found

/recalc:
  post:
    description: |
      Iterates all projects that have a session template.
      Recalculate if projects' sessions satisfy the template.
      Returns list of modified session ids.
    responses:
      200:
        description: |
          Projects' sessions' compliance was recalculated.
          Returns list of session that were modified.