Notes/test-etapi/put-note-content.http

31 lines
627 B
Plaintext
Raw Permalink Normal View History

2022-01-08 12:01:54 +01:00
POST {{triliumHost}}/etapi/create-note
2022-01-10 17:09:20 +01:00
Authorization: {{authToken}}
2022-01-08 12:01:54 +01:00
Content-Type: application/json
{
"parentNoteId": "root",
"title": "Hello",
"type": "code",
"mime": "text/plain",
"content": "Hi there!"
}
> {% client.global.set("createdNoteId", response.body.note.noteId); %}
###
PUT {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
2022-01-10 17:09:20 +01:00
Authorization: {{authToken}}
2022-01-08 12:01:54 +01:00
Content-Type: text/plain
Changed content
> {% client.assert(response.status === 204); %}
2022-01-08 12:01:54 +01:00
###
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
2022-01-10 17:09:20 +01:00
Authorization: {{authToken}}
2022-01-08 12:01:54 +01:00
> {% client.assert(response.body === "Changed content"); %}