Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
api:api_applicants_id_notes [2024/01/23 19:17] Lauriapi:api_applicants_id_notes [2025/03/28 22:44] (current) – [Response example] Lauri
Line 25: Line 25:
 ==== Response example ==== ==== Response example ====
  
-  "Some comments"+== API version >= 6 ==
  
 +  {
 +    "1": {
 +        "created": "1970-01-01T00:00:01+00:00",
 +        "removed": null,
 +        "colour": "Yellow",
 +        "pinned": false,
 +        "collapsed": false,
 +        "Notes": "Some comments",
 +    },
 +    "2": {
 +        "created": "1970-01-01T00:00:01+00:00",
 +        "removed": null,
 +        "colour": "Salmon",
 +        "pinned": true,
 +        "collapsed": false,
 +        "Notes": "Some other comments",
 +    },
 +  }
  
-===== PUT =====+== API version  < 6 ==
  
-Set the notes to some text, overwriting the existing notes. +  "Some comments"
- +
-==== Syntax ==== +
- +
-  PUT /api/applicants/123/notes +
-  Host: apply.example.edu +
-  Authorization: DREAM apikey="..." +
- +
-==== Raw request body ==== +
- +
-Note that the comments have to be a proper JSON string token. In a JSON string only space is allowed per the specification, newlines, for example, have to be encoded. +
- +
-  "Some notes\nAnother line" +
- +
-==== Response headers ==== +
- +
-  Content-Type: text/plain +
-  Content-Length:+
- +
-==== Response codes ==== +
- +
-| ''204 No Content'' | The notes were saved | +
-| ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. |+