Stormz

Developer


Criteria

List all criteria

List the current criteria for the workshop.

GET /v1/workshops/:workshop_id/criteria

Response

200 OK
[
  {
    "id": "5007d396eb7abf319a000047",
    "title": "Feasible",
    "scale": 1,
    "current_scale": [
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10
    ],
    "ratings": [

    ]
  }
]

Create a criterion

POST /v1/workshops/:workshop_id/criteria

Parameters

Name Type Description
title string Required the title of the criterion
scale integer Required the index of the choosen scale
Scales
  • 1: from 0 to 10 with a step of 1
  • 2: 0, 1, 3, 9
  • 3: 0, 5, 10
  • 4: from 0 to 4 with a step of 1

Example

{
  "title": "Feasible",
  "scale": 1
}

Response

201 Created
{
  "id": "5007d396eb7abf319a000047",
  "title": "Feasible",
  "scale": 1,
  "current_scale": [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ],
  "ratings": [

  ]
}

Get a criterion

GET /v1/workshops/:workshop_id/criteria/:id

Response

200 OK
{
  "id": "5007d396eb7abf319a000047",
  "title": "Feasible",
  "scale": 1,
  "current_scale": [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ],
  "ratings": [

  ]
}

Update a criterion

PUT /v1/workshops/:workshop_id/criteria/:id

Parameters

Name Type Description
title string the title of the criterion

Response

204 No Content

Delete a criterion

DELETE /v1/workshops/:workshop_id/criteria/:id

Response

204 No Content