search.http 898 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. POST {{triliumHost}}/etapi/create-note
  2. Authorization: {{authToken}}
  3. Content-Type: application/json
  4. {
  5. "parentNoteId": "root",
  6. "title": "title",
  7. "type": "text",
  8. "content": "{{$uuid}}"
  9. }
  10. > {% client.global.set("createdNoteId", response.body.note.noteId); %}
  11. ###
  12. GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content
  13. Authorization: {{authToken}}
  14. > {% client.global.set("content", response.body); %}
  15. ###
  16. GET {{triliumHost}}/etapi/notes?search={{content}}&debug=true
  17. Authorization: {{authToken}}
  18. > {%
  19. client.assert(response.status === 200);
  20. client.assert(response.body.results.length === 1);
  21. %}
  22. ### Same but with fast search which doesn't look in the content so 0 notes should be found
  23. GET {{triliumHost}}/etapi/notes?search={{content}}&fastSearch=true
  24. Authorization: {{authToken}}
  25. > {%
  26. client.assert(response.status === 200);
  27. client.assert(response.body.results.length === 0);
  28. %}