Language
API version
Select a version to change the base URI
in syntax and code examples. Learn about versions:
in syntax and code examples. Learn about versions
Represents the language of the scoresheet score.
URI
/api/v9/scoresheets/ID/score/ID/languageGET Get the language
A request with the GET verb returns the score’s language code as JSON encoded string (or null, if there is no language stored).
Syntax
GET /api/v9/scoresheets/123/score/321/language
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/language"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | application/json | Media type of the resource |
Content-Length | 1234 | Size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
200 OK | The language was successfully returned |
404 Not Found | The scoresheet does not have this score |
Example response
Response
"en"PUT Set the language
Set the language of a scoresheet score to a particular value.
Syntax
PUT /api/v9/scoresheets/123/scores/321/language
Host: apply.example.edu
Authorization: DREAM apikey="..."Raw request body
Write the JSON encoded language into the request body. Note that it is a JSON string, so it has to be enclosed in double quotes. It should be a valid ISO 639-1 Alpha2 language identifier such as "en", "it", etc. Note that you cannot set a language to an empty value, please use the DELETE verb for that.
Request body
"en"Example request
Request
curl
curl \
-X PUT \
-H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
-d '"en"' \
"https://apply.example.edu/api/v9/scoresheets/123/scores/321/language"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | text/plain | Media type of the resource |
Content-Length | 0 | Size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
204 No Content | The language was successfully saved |
404 Not Found | The scoresheet does not have this score |
400 Bad Request | The language code was not valid |
DELETE Delete the language
Delete the language of a scoresheet score.
Syntax
DELETE /api/v9/scoresheets/123/scores/321/language
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/language"Response headers
| Header | Value | Description |
|---|---|---|
Content-Type | text/plain | Media type of the resource |
Content-Length | 0 | Size of the response body in bytes |
Response codes
| Response code | Description |
|---|---|
204 No Content | The language was successfully cleared |
404 Not Found | The scoresheet does not have this score |