Creating Organizations and Datasets with Trieve
Learn how to create and manage organizations and datasets with Trieve
Overview
We provide the ability to create and independently manage organizations and datasets for multi-tenant use cases. With Trieve, you have full control of each organization’s users, configurations, and datasets.
Creating an Organization
The main route we use to expose this functionality is the create organization route. Use the name
parameter to pass a arbitrary, unique name which will be used to identify the organization.
Example of creating an organization on demand through the API:
Creating a Dataset
To create a dataset, use the create dataset route.
Important parameters
crawl_options
: Provides the options to setup crawling to populate your dataset (e.g., include/exclude paths, tags, and more).dataset_name
: The name of the dataset. This must be a unique within the organization.server_configuration
: Provide the server configuration for the dataset such as RAG and system prompt, stop tokens, embedding models, and more.tracking_id
: A unique, optional tracking ID for the dataset that can be used to track the dataset in external systems.
Example of creating a dataset through the API:
Managing multiple organizations
Trieve provides a solution for multi-tenanted environments, allowing users to manage and operate across multiple organizations. Each organization can have its own datasets, configurations, and users.
To access different organizations, use the TR-Organization
header. For example, to fetch the details of a specific organization, you can do:
Update configuration across datasets
To update all dataset configs in an organization, use the update all dataset configurations route. Use the server_configuration
parameter to pass in a new configuration for all datasets in the organization.
Example of updating all dataset configurations in an organization:
Only the specified keys in the server_configuration
object will be updated
for each dataset, keeping the unique values for other fields unchanged.