This is an old revision of the document!


/api/scoresheets/ID/score/ID/points

HEAD, GET

A request with the GET verb returns the score's points as JSON encoded string (or null, if there are no points set). Note that 0 points is returned as “0” as it is a perfectly valid number of points.

Syntax

GET /api/scoresheets/123/score/321/points
Host: apply.example.edu
Authorization: DREAM apikey="..."

Response headers

Content-Type: application/json
Content-Length: 1234

Response codes

200 OK The value is returned successfully
404 Not Found Scoresheet does not have this score

Response example

"3.14"

PUT

Set the points of a scoresheet score to a particular value. This will still run all validation checks and will not permit illegal point values to be entered that fall out of the accepted range as set in the scoresheet settings. If setting mapped values (for example if 5 = Excellent), the numeric value must be sent.

Syntax

PUT /api/scoresheets/123/scores/321/points
Host: apply.example.edu
Authorization: DREAM apikey="..."

Raw request body

Write the JSON encoded points into the request body. Note that it is a JSON string, so it has to be enclosed in double quotes. You can set 0 points (which is perfectly valid) as “0” or “0.0” or “0.00”, as you please. But you cannot clear the points using this method. Please use the DELETE verb for that.

"3.14"

Response headers

Content-Type: text/plain
Content-Length: 0

Response codes

204 No Content The points were successfully saved
404 Not Found Scoresheet does not have this score
400 Bad Request The points value did not pass the validation tests or is not a JSON string with double quotes.