mirror of
https://github.com/zadam/trilium.git
synced 2024-12-26 01:01:26 +08:00
30 lines
627 B
HTTP
30 lines
627 B
HTTP
POST {{triliumHost}}/etapi/create-note
|
|
Authorization: {{authToken}}
|
|
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
|
|
Authorization: {{authToken}}
|
|
Content-Type: text/plain
|
|
|
|
Changed content
|
|
|
|
> {% client.assert(response.status === 200); %}
|
|
|
|
###
|
|
|
|
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
|
|
Authorization: {{authToken}}
|
|
|
|
> {% client.assert(response.body === "Changed content"); %}
|