notes
Classes
NotesClient
NotesClient(client: OWUIClientBase)
Bases: ResourceBase
Client for the Notes endpoints.
- Code Reference client Classes OpenWebUI Attributes notes
Source code in src/owui_client/client_base.py
Functions
get_notes
get_notes() -> List[NoteItemResponse]
Get all notes visible to the user.
This endpoint returns a list of notes that the user has permission to view. If the user is an admin, they can see all notes. Otherwise, they can see their own notes and notes shared with them.
Returns:
| Type | Description |
|---|---|
List[NoteItemResponse]
|
A list of |
Source code in src/owui_client/routers/notes.py
search_notes
search_notes(query: Optional[str] = None, view_option: Optional[str] = None, permission: Optional[str] = None, order_by: Optional[str] = None, direction: Optional[str] = None, page: Optional[int] = 1) -> NoteListResponse
Search for notes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Optional[str]
|
Search query string. |
None
|
view_option
|
Optional[str]
|
View option filter (e.g., 'created', 'shared'). |
None
|
permission
|
Optional[str]
|
Permission filter (e.g., 'read', 'write'). |
None
|
order_by
|
Optional[str]
|
Field to order by. |
None
|
direction
|
Optional[str]
|
Sort direction ('asc', 'desc'). |
None
|
page
|
Optional[int]
|
Page number (default 1). |
1
|
Returns:
| Type | Description |
|---|---|
NoteListResponse
|
|
Source code in src/owui_client/routers/notes.py
create_note
Create a new note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
form_data
|
NoteForm
|
The data for the new note. |
required |
Returns:
| Type | Description |
|---|---|
Optional[NoteModel]
|
The created note, or None if creation failed. |
Source code in src/owui_client/routers/notes.py
get_note_by_id
get_note_by_id(id: str) -> Optional[NoteModel]
Get a specific note by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the note. |
required |
Returns:
| Type | Description |
|---|---|
Optional[NoteModel]
|
The requested note, or None if not found or not accessible. |
Source code in src/owui_client/routers/notes.py
update_note_by_id
Update an existing note.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the note to update. |
required |
form_data
|
NoteForm
|
The updated data for the note. Note that 'title' is required. |
required |
Returns:
| Type | Description |
|---|---|
Optional[NoteModel]
|
The updated note, or None if update failed. |
Source code in src/owui_client/routers/notes.py
update_note_access_by_id
update_note_access_by_id(id: str, form_data: NoteAccessGrantsForm) -> Optional[NoteModel]
Update access grants for a note.
This endpoint allows setting access grants for a note, controlling who can read or write to it. Only the note owner or users with write access can modify access grants. Non-admin users cannot set public access grants unless they have the 'sharing.public_notes' permission.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the note. |
required |
form_data
|
NoteAccessGrantsForm
|
The access grants form containing the list of access grants. |
required |
Returns:
| Type | Description |
|---|---|
Optional[NoteModel]
|
The updated note, or None if update failed. |
Source code in src/owui_client/routers/notes.py
delete_note_by_id
Delete a note by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The unique identifier of the note to delete. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if deletion was successful, False otherwise. |