put-note-content.http 627 B

123456789101112131415161718192021222324252627282930
  1. POST {{triliumHost}}/etapi/create-note
  2. Authorization: {{authToken}}
  3. Content-Type: application/json
  4. {
  5. "parentNoteId": "root",
  6. "title": "Hello",
  7. "type": "code",
  8. "mime": "text/plain",
  9. "content": "Hi there!"
  10. }
  11. > {% client.global.set("createdNoteId", response.body.note.noteId); %}
  12. ###
  13. PUT {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
  14. Authorization: {{authToken}}
  15. Content-Type: text/plain
  16. Changed content
  17. > {% client.assert(response.status === 204); %}
  18. ###
  19. GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
  20. Authorization: {{authToken}}
  21. > {% client.assert(response.body === "Changed content"); %}