Collections
Classes
Collections
Bases: outline_wiki_api.resources.base.Resources
Collections represent grouping of documents in the knowledge base, they
offer a way to structure information in a nested hierarchy and a level
at which read and write permissions can be granted to individual users or
groups of users.
Methods:
| Name | Description |
|---|---|
info |
Retrieve a collection |
documents |
Retrieve a collections document structure |
list |
List all collections |
create |
Create a collection |
update |
Update a collection |
delete |
Delete a collection |
add_user |
Add a user to a collection |
remove_user |
Remove a user from a collection |
Functions
add_user
Add a collection user
This method allows you to add a user membership to the specified collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
The id of the collection |
required | |
email
|
The id of the user to add |
required | |
permission
|
outline_wiki_api.models.response.Permission | str | None
|
The permission to grant the user |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Collection |
outline_wiki_api.models.collection.CollectionResponse
|
The updated collection |
create
Create a new collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the collection |
required |
description
|
str | None
|
A brief description of the collection, markdown supported |
None
|
permission
|
outline_wiki_api.models.response.Permission | None
|
The permission of the collection |
None
|
icon
|
str | None
|
A string that represents an icon in the outline-icons package or an emoji |
None
|
color
|
str | None
|
A hex color code for the collection icon |
None
|
sharing
|
bool
|
Whether public sharing of documents is allowed |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Collection |
The created collection |
delete
Delete a collection
This method allows you to delete a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
The id of the collection |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
True if the collection was deleted, False otherwise |
documents
Retrieve a collections document structure (as nested navigation nodes)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collection_id
|
str | uuid.UUID
|
Unique identifier for the collection |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CollectionNavigationResponse |
A response containing a nested structure of document navigation nodes |
info
Retrieve a collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
collection_id
|
str | uuid.UUID
|
Unique identifier for the collection |
required |
Returns:
| Name | Type | Description |
|---|---|---|
CollectionResponse |
outline_wiki_api.models.collection.CollectionResponse
|
A response containing a Collection object |
list
List all collections
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str | None
|
If set, will filter the results by collection name |
None
|
status_filter
|
outline_wiki_api.resources.collections.Collections.list[str] | None
|
Optional statuses to filter by |
None
|
pagination
|
outline_wiki_api.models.response.Pagination | None
|
Pagination options |
None
|
sorting
|
outline_wiki_api.models.response.Sort | None
|
Sorting options |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
CollectionListResponse |
outline_wiki_api.models.collection.CollectionListResponse
|
A response containing an array of Collection objects |
remove_user
Remove a collection user
This method allows you to remove a user membership from the specified collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
The id of the collection |
required | |
email
|
The id of the user to remove |
required |
Returns:
| Name | Type | Description |
|---|---|---|
success |
bool
|
Status of the operation |
update
Update a collection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
The id of the collection |
required | |
name
|
str | None
|
The name of the collection |
None
|
description
|
str | None
|
A brief description of the collection, markdown supported |
None
|
permission
|
outline_wiki_api.models.response.Permission | None
|
The permission of the collection |
None
|
icon
|
str | None
|
A string that represents an icon in the outline-icons package or an emoji |
None
|
color
|
str | None
|
A hex color code for the collection icon |
None
|
sharing
|
bool | None
|
Whether public sharing of documents is allowed |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Collection |
The updated collection |