Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
api:api_scoresheets_id_scores [2019/03/05 15:04] – created Anton Smirnovapi:api_scoresheets_id_scores [2021/09/09 14:13] (current) – [Response example] Lauri Elevant
Line 24: Line 24:
 ==== Response example ==== ==== Response example ====
  
-<code javascript>+<code>
 { {
     "1": {     "1": {
         "scored": "2019-03-05T14:57:36+00:00",         "scored": "2019-03-05T14:57:36+00:00",
         "application": "/api/applications/2",         "application": "/api/applications/2",
 +        "scoresheet": "/api/scoresheets/1",
         "points": "20.00",         "points": "20.00",
         "comments": "One"         "comments": "One"
Line 35: Line 36:
         "scored": "2019-03-05T14:57:33+00:00",         "scored": "2019-03-05T14:57:33+00:00",
         "application": "/api/applications/3",         "application": "/api/applications/3",
 +        "scoresheet": "/api/scoresheets/1",        
         "points": "40.00",         "points": "40.00",
         "comments": "Two"         "comments": "Two"
Line 41: Line 43:
         "scored": "2019-03-05T14:57:30+00:00",         "scored": "2019-03-05T14:57:30+00:00",
         "application": "/api/applications/4",         "application": "/api/applications/4",
 +        "scoresheet": "/api/scoresheets/1",        
         "points": "60.00",         "points": "60.00",
         "comments": "Three"         "comments": "Three"
Line 47: Line 50:
         "scored": "2019-03-05T14:57:27+00:00",         "scored": "2019-03-05T14:57:27+00:00",
         "application": "/api/applications/7",         "application": "/api/applications/7",
 +        "scoresheet": "/api/scoresheets/1",        
         "points": "80.00",         "points": "80.00",
         "comments": "Good"         "comments": "Good"
Line 53: Line 57:
         "scored": "2019-03-05T14:57:23+00:00",         "scored": "2019-03-05T14:57:23+00:00",
         "application": "/api/applications/8",         "application": "/api/applications/8",
 +        "scoresheet": "/api/scoresheets/1",        
         "points": "100.00",         "points": "100.00",
         "comments": "Awesome"         "comments": "Awesome"
Line 58: Line 63:
 } }
 </code> </code>
 +
 +
 +===== POST =====
 +
 +Append an application to the scoresheet in question. If the application is already on this scoresheet, it will just update the score (and optionally, the comments).
 +
 +
 +
 +
 +==== Syntax ====
 +
 +  POST /api/scoresheets/123/scores
 +  Host: apply.example.edu
 +  Authorization: DREAM apikey="..."
 +  
 +==== Parameters ====
 +
 +^ Name ^  ^ Description ^
 +| ''application'' | **Required** | An application ID to add |
 +| ''points'' | **Required** | The points to set for this scoresheet score. Validation depends on the scoresheet settings. In case of a mapped-type value, it takes the numeric equivalent. |
 +| ''comments'' | Optional | Up to 512 characters of comments. May be omitted or left empty in which case it has no effect (including leaving any existing comments in place). |
 +
 +==== Response headers ====
 +
 +  Content-Type: application/json
 +  Content-Length: 0
 +
 +==== Response codes ====
 +
 +| ''201 Created'' | New applicant/lead was created |