5. Notes

5.1. Get Notes

Endpoint: /notes/notes/<notebook_id>
Method: POST
Request header: Authorization: Bearer <access_token>
Description: Get the list of notes of a notebook by a filter
Request data:
Field Type Required Comments
archived boolean No If false, only active notes are returned. If true, only archived notes are returned. If this item is not present in the request data, then no filter by state is applied and all notes are returned regardless their state.
tags list of strings No list of strings containing the tag names to filter the notes by. If this item is present in the request data, only notes than have any of these tags are returned in the result. If this item is not present in the request data, then no filter by tags is applied and all notes are returned regardless their tags.
no_tags boolean No This item applies only if the tags item is present in the request data too. If true, notes with no tags are returned as well. If false or if this item is not present in the request data, notes with no tags are not returned.
last_mod boolean No If true, returned notes are sorted by their Last Modified timestamp. If false or if this item is not present in the request data, the notes are sorted by their Created timestamp.
asc boolean No If true or if this item is not present in the request data, the order of the returned notes is ascending. If false, the order is descending.
Response data:
Field Type
message string
message_type string
result
list of objects
- id: string
- archived: boolean
- title: string (optional)
- tags: list of strings (optional)
- created: string
- last_modified: string
Request example:
curl -X 'POST' '{{ host_url }}notes/notes/<notebook_id>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{"archived": false, "tags": ["tag_name_1", "tag_name_2"]}'

5.2. Get Note

Endpoint: /notes/note/<note_id>
Method: GET
Request header: Authorization: Bearer <access_token>
Description: Get a note
Response data:
Field Type
message string
message_type string
result
object
- id: string
- notebook_id: string
- archived: boolean
- title: string (optional)
- body: string (optional)
- tags: list of strings (optional)
- created: string
- last_modified: string
Request example:
curl -X 'GET' '{{ host_url }}notes/note/<note_id>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>'

5.3. Create Note

Endpoint: /notes/note
Methods: POST, PUT
Request header: Authorization: Bearer <access_token>
Description: Create a note
Request data:
Field Type Required Default value
notebook_id string Yes
archived boolean No false
title string No
body string No
tags list of strings No
Response data:
Field Type
message string
message_type string
result
object:
- note_id: string
Request example:
curl -X 'POST' '{{ host_url }}notes/note' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{"notebook_id": "<notebook_id>", "archived": false, "title": "Example Note", "body": "This is a test note", tags: ["tag1", "tag2"]}'

5.4. Update Note

Endpoint: /notes/note/<note_id>
Method: PUT
Request header: Authorization: Bearer <access_token>
Description: Update some or all fields of a note
Request data:
Field Type Required Default value
notebook_id string Yes
archived boolean No false
title string No
body string No
tags list of string No
Response data:
Field Type
message string
message_type string
Request example:
curl -X 'PUT' '{{ host_url }}notes/note/<note_id>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{"notebook_id": "<notebook_id>", "archived": false, "title": "Example Note", "body": "This is a test note", tags: ["tag1", "tag2"]}'

5.5. Delete Note

Endpoint: /notes/note/<note_id>
Method: DELETE
Request header: Authorization: Bearer <access_token>
Description: Delete a note
Response data:
Field Type
message string
message_type string
Request example:
curl -X 'DELETE' '{{ host_url }}notes/note/<note_id>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>'