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 [2021/11/17 16:34] Lauriapi:api_applicants_id_notes [2025/05/26 13:31] (current) Lauri
Line 24: Line 24:
  
 ==== Response example ==== ==== Response example ====
 +
 +== 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",
 +    },
 +  }
 +
 +== API version  < 6 ==
  
   "Some comments"   "Some comments"
  
  
-===== PUT =====+===== POST =====
  
-Set the notes to some text, overwriting the existing notes.+Create a new applicant note
  
 ==== Syntax ==== ==== Syntax ====
  
-  PUT /api/applicants/123/notes+  POST /api/applicants/123/notes
   Host: apply.example.edu   Host: apply.example.edu
   Authorization: DREAM apikey="..."   Authorization: DREAM apikey="..."
  
-==== Raw request body ====+==== Parameters ====
  
-Note that the comments have to be a proper JSON string token. In a JSON string only space is allowed per the specificationnewlinesfor examplehave to be encoded.+^ Name ^  ^ Description ^ Notes ^ 
 +| ''colour'' | Optional | Specify the colour of the (sticky) note: ''Yellow''''Orange''''Salmon''''Green'', ''Blue'', ''Violet'' | | 
 +| ''color'' | Optional | An alias for ''colour'' | [1] |
  
-  "Some notes\nAnother line" +  * /Note [1]If both ''colour'' and ''color'' are specifiedthen ''colour'' is preferred.//
- +
-==== 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. | +
- +
- +
-===== PATCH ===== +
- +
-Append some text to existing applicant notespreserving what is already there. +
- +
-==== Syntax ==== +
- +
-  PATCH /api/applicants/123/notes +
-  Host: apply.example.edu +
-  Authorization: DREAM apikey="..."+
  
 ==== Raw request body ==== ==== Raw request body ====
Line 81: Line 85:
 | ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. | | ''400 Bad Request'' | Invalid notes. Please make sure that status is a valid JSON string with quotes. |
  
- 
-===== DELETE ===== 
- 
-Delete the notes on this applicant card. 
- 
-==== Syntax ==== 
- 
-  DELETE /api/applicants/123/notes 
-  Host: apply.example.edu 
-  Authorization: DREAM apikey="..." 
- 
- 
-==== Response headers ==== 
- 
-  Content-Type: text/plain 
-  Content-Length: 0 
- 
-==== Response codes ==== 
- 
-| ''204 No Content'' | The notes were deleted |