Ratings
List all ratings
List the ratings within the scope of a workshop and a card.
GET /v1/workshops/:workshop_id/cards/:card_id/ratings
Parameters
Name |
Type |
Description |
criterium_id |
string |
filter by the criterium_id |
Response
[
{
"id": "5007d396eb7abf319a000047",
"value": 2,
"user_id": "5007d396eb7abf319a000048",
"criterium_id": "5007d396eb7abf319a000049"
}
]
Create a rating
POST /v1/workshops/:workshop_id/cards/:card_id/ratings
Parameters
Name |
Type |
Description |
value |
integer |
Required the value of the rating |
criterium_id |
string |
Required the id of the criterium |
Example
{
"criterium_id": "criterium_id",
"value": 2
}
Response
{
"id": "5007d396eb7abf319a000047",
"value": 2,
"user_id": "5007d396eb7abf319a000048",
"criterium_id": "5007d396eb7abf319a000049"
}
Get a rating
GET /v1/workshops/:workshop_id/cards/:card_id/ratings/:id
Response
{
"id": "5007d396eb7abf319a000047",
"value": 2,
"user_id": "5007d396eb7abf319a000048",
"criterium_id": "5007d396eb7abf319a000049"
}
Update a rating
PUT /v1/workshops/:workshop_id/cards/:card_id/ratings/:rating_id
Parameters
Name |
Type |
Description |
value |
integer |
the value of the rating |
Example
{
"criterium_id": "criterium_id",
"value": 2
}
Response
{
"id": "5007d396eb7abf319a000047",
"value": 2,
"user_id": "5007d396eb7abf319a000048",
"criterium_id": "5007d396eb7abf319a000049"
}
Delete a rating
DELETE /v1/workshops/:workshop_id/cards/:card_id/ratings/:id
Response