Comments

Represents the comments for the scoresheet score.

URI
/api/v9/scoresheets/ID/scores/ID/comments

GET Get comments

A request with the GET verb returns the score’s comments as JSON encoded string (or null, if there are no comments stored).

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

Example request

Request
curl
curl \
  -X GET \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/scoresheets/123/scores/321/comments"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length1234Size of the response body in bytes

Response codes

Response codeDescription
200 OKThe comments were successfully returned
404 Not FoundThe scoresheet does not have this score

Example response

Response
"Some comments"

PUT Add comments

Set the comments of a scoresheet score to a particular text.

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

Raw request body

Write the JSON encoded comments into the request body. Note that it is a JSON string, so it has to be enclosed in double quotes. The maximum allowed length is 512 characters. Note that you cannot set comments to an empty value, please use the DELETE verb for that.

Request body
"Some comments"

Example request

Request
curl
curl \
  -X PUT \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  -d '"Some comments"' \
  "https://apply.example.edu/api/v9/scoresheets/123/scores/321/comments"

Response headers

HeaderValueDescription
Content-Typetext/plainMedia type of the resource
Content-Length0Size of the response body in bytes

Response codes

Response codeDescription
204 No ContentThe comments were successfully saved
404 Not FoundThe scoresheet does not have this score
400 Bad RequestThe comments text was not valid (empty or too long)

DELETE Delete comments

Delete the comments of a scoresheet score.

Syntax
DELETE /api/v9/scoresheets/123/scores/321/comments
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X DELETE \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/scoresheets/123/scores/321/comments"

Response headers

HeaderValueDescription
Content-Typetext/plainMedia type of the resource
Content-Length0Size of the response body in bytes

Response codes

Response codeDescription
204 No ContentThe comments were successfully cleared
404 Not FoundScoresheet does not have this score