mirror of https://github.com/TriliumNext/Notes
ETAPI search endpoint
parent
c5366abf75
commit
c33bc7e12c
@ -0,0 +1,35 @@
|
||||
POST {{triliumHost}}/etapi/create-note
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"parentNoteId": "root",
|
||||
"title": "title",
|
||||
"type": "text",
|
||||
"content": "{{$uuid}}"
|
||||
}
|
||||
|
||||
> {% client.global.set("createdNoteId", response.body.note.noteId); %}
|
||||
|
||||
###
|
||||
|
||||
GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
|
||||
|
||||
> {% client.global.set("content", response.body); %}
|
||||
|
||||
###
|
||||
|
||||
GET {{triliumHost}}/etapi/notes?search={{content}}
|
||||
|
||||
> {%
|
||||
client.assert(response.status === 200);
|
||||
client.assert(response.body.length === 1);
|
||||
%}
|
||||
|
||||
### Same but with fast search which doesn't look in the content so 0 notes should be found
|
||||
|
||||
GET {{triliumHost}}/etapi/notes?search={{content}}&fastSearch=true
|
||||
|
||||
> {%
|
||||
client.assert(response.status === 200);
|
||||
client.assert(response.body.length === 0);
|
||||
%}
|
||||
Loading…
Reference in New Issue