Endpoint: | /auth/login |
---|---|
Method: | POST |
Description: | Get a fresh access token and a refresh token |
Field | Type | Required |
---|---|---|
username | String | Yes |
password | String | Yes |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- user_id: String
- access_token: String,
- refresh_token: String
|
Endpoint: | /auth/refresh |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <refresh_token> |
Description: | Get a new, not fresh, access token |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- access_token: String
|
Endpoint: | /auth/logout |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Revoke an access token |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /users/users |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get the list of users |
Permission required: | Administrator |
Field | Type |
---|---|
message | String |
message_type | String |
result |
List of objects:
- id: String
- username: String
- admin: Boolean
- enabled: Boolean
- name: String, null
- email: String, null
|
Endpoint: | /users/user/<user_id> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get a user |
Permission required: | Administrator if the user to get is other than the user that makes the request |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- id: String
- username: String
- admin: Boolean
- enabled: Boolean
- name: String, null
- email: String, null
|
Endpoint: | /users/user |
---|---|
Methods: | POST, PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Create a user |
Permission required: | Administrator |
Field | Type | Required | Default value |
---|---|---|---|
username | String | Yes | |
password | String | Yes | |
admin | Boolean | No | false |
enabled | Boolean | No | false |
name | String, null | No | null |
String, null | No | null |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- user_id: String
|
Endpoint: | /users/user/<user_id> |
---|---|
Method: | PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Update some or all fields of a user |
Permission required: | Administrator if the user to update is other than the user that makes the request or if the fields to update include username, admin or enabled |
Field | Type | Required |
---|---|---|
username | String | No |
password | String | No |
admin | Boolean | No |
enabled | Boolean | No |
name | String, null | No |
String, null | No |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /users/user/<user_id> |
---|---|
Method: | DELETE |
Request header: | Authorization: Bearer <access_token> |
Description: | Delete a user |
Fresh access token required: | Yes |
Permission required: | Administrator |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /notebooks/notebooks |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get the list of notebooks of the user that makes the request |
Field | Type |
---|---|
message | String |
message_type | String |
result |
List of objects:
- id: String
- name: String
|
Endpoint: | /notebooks/notebook/<notebook_id> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get a notebook |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- id: String
- name: String
|
Endpoint: | /notebooks/notebook |
---|---|
Methods: | POST, PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Create a notebook |
Field | Type | Required |
---|---|---|
name | String | Yes |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- notebook_id: String
|
Endpoint: | /notebooks/notebook/<notebook_id> |
---|---|
Method: | PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Update some or all fields of a notebook |
Field | Type | Required |
---|---|---|
name | String | No |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /notebooks/notebook/<notebook_id> |
---|---|
Method: | DELETE |
Request header: | Authorization: Bearer <access_token> |
Description: | Delete a notebook |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /tags/tags/<notebook_id> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get the list of tags of a notebook |
Field | Type |
---|---|
message | String |
message_type | String |
result |
List of objects:
- id: String
- name: String
- color: String, null
|
Endpoint: | /tags/tag/<tag_id> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get a tag |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- id: String
- notebook_id: String
- name: String
- color: String, null
|
Endpoint: | /tags/tag |
---|---|
Methods: | POST, PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Create a tag |
Field | Type | Required | Default value |
---|---|---|---|
notebook_id | String | Yes | |
name | String | Yes | |
color | String, null | No | null |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- tag_id: String
|
Endpoint: | /tags/tag/<tag_id> |
---|---|
Method: | PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Update some or all fields of a tag |
Field | Type | Required |
---|---|---|
name | String | No |
color | String, null | No |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /tags/tag/<tag_id> |
---|---|
Method: | DELETE |
Request header: | Authorization: Bearer <access_token> |
Description: | Delete a tag |
Field | Type |
---|---|
message | String |
message_type | String |
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 |
Field | Type | Required | Comments |
---|---|---|---|
active | Boolean | No | If true, only active notes are returned. If false, only archived (not active) 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. |
Field | Type |
---|---|
message | String |
message_type | String |
result |
List of objects:
- id: String
- active: Boolean
- title: String, null
- created_ts: Integer
- last_modified_ts: Integer
- tags: List of objects:
- id: String
- name: String
- color: String, null
|
Endpoint: | /notes/note/<note_id> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Get a note |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- id: String
- notebook_id: String
- active: Boolean
- title: String, null
- body: String, null
- created_ts: Integer
- last_modified_ts: Integer
- tags: List of objects:
- id: String
- name: String
- color: String, null
|
Endpoint: | /notes/note |
---|---|
Methods: | POST, PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Create a note |
Field | Type | Required | Default value |
---|---|---|---|
notebook_id | String | Yes | |
active | Boolean | No | true |
title | String, null | No | null |
body | String, null | No | null |
tags | List of strings | No | [] |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- note_id: String
|
Endpoint: | /notes/note/<note_id> |
---|---|
Method: | PUT |
Request header: | Authorization: Bearer <access_token> |
Description: | Update some or all fields of a note |
Field | Type | Required |
---|---|---|
active | Boolean | No |
title | String, null | No |
body | String, null | No |
tags | List of strings | No |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /notes/note/<note_id> |
---|---|
Method: | DELETE |
Request header: | Authorization: Bearer <access_token> |
Description: | Delete a note |
Field | Type |
---|---|
message | String |
message_type | String |
Endpoint: | /search/<search> |
---|---|
Method: | GET |
Request header: | Authorization: Bearer <access_token> |
Description: | Search for notebooks, tags and notes that match a given text |
Field | Type |
---|---|
message | String |
message_type | String |
result |
Object:
- notebooks: List of objects:
- id: String
- name: String
- tags: List of objects:
- id: String
- notebook_id: String
- name: String
- color: String, null
- notes: List of objects:
- id: String
- notebook_id: String
- active: Boolean
- title: String
- created_ts: Integer
- last_modified_ts: Integer
- tags: List of objects:
- id: String
- name: String
- color: String, null
|