All URIs are relative to https://api.trieve.ai
Method | HTTP request | Description |
---|---|---|
create_dataset | POST /api/dataset | Create dataset |
delete_dataset | DELETE /api/dataset/{dataset_id} | Delete Dataset |
get_client_dataset_config | GET /api/dataset/envs | Get Client Configuration |
get_dataset | GET /api/dataset/{dataset_id} | Get Dataset |
get_datasets_from_organization | GET /api/dataset/organization/{organization_id} | Get Datasets from Organization |
update_dataset | PUT /api/dataset | Update Dataset |
Dataset create_dataset(tr_organization, create_dataset_request)
Create dataset
Create dataset Create a new dataset. The auth'ed user must be an owner of the organization to create a dataset.
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.models.create_dataset_request import CreateDatasetRequest
from trieve_py_client.models.dataset import Dataset
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_organization = 'tr_organization_example' # str | The organization id to use for the request
create_dataset_request = trieve_py_client.CreateDatasetRequest() # CreateDatasetRequest | JSON request payload to create a new dataset
try:
# Create dataset
api_response = api_instance.create_dataset(tr_organization, create_dataset_request)
print("The response of DatasetApi->create_dataset:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DatasetApi->create_dataset: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | str | The organization id to use for the request | |
create_dataset_request | CreateDatasetRequest | JSON request payload to create a new dataset |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Dataset created successfully | - |
400 | Service error relating to creating the dataset | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_dataset(tr_dataset, dataset_id)
Delete Dataset
Delete Dataset Delete a dataset. The auth'ed user must be an owner of the organization to delete a dataset.
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
dataset_id = 'dataset_id_example' # str | The id of the dataset you want to delete.
try:
# Delete Dataset
api_instance.delete_dataset(tr_dataset, dataset_id)
except Exception as e:
print("Exception when calling DatasetApi->delete_dataset: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_dataset | str | The dataset id to use for the request | |
dataset_id | str | The id of the dataset you want to delete. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Dataset deleted successfully | - |
400 | Service error relating to deleting the dataset | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClientDatasetConfiguration get_client_dataset_config(tr_dataset)
Get Client Configuration
Get Client Configuration Get the client configuration for a dataset. Will use the TR-D
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.models.client_dataset_configuration import ClientDatasetConfiguration
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
try:
# Get Client Configuration
api_response = api_instance.get_client_dataset_config(tr_dataset)
print("The response of DatasetApi->get_client_dataset_config:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DatasetApi->get_client_dataset_config: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_dataset | str | The dataset id to use for the request |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Dataset environment variables | - |
400 | Service error relating to retrieving the dataset. Typically this only happens when your auth credentials are invalid. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Dataset get_dataset(tr_organization, tr_dataset, dataset_id)
Get Dataset
Get Dataset Get a dataset by id. The auth'ed user must be an admin or owner of the organization to get a dataset.
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.models.dataset import Dataset
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_organization = 'tr_organization_example' # str | The organization id to use for the request
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
dataset_id = 'dataset_id_example' # str | The id of the dataset you want to retrieve.
try:
# Get Dataset
api_response = api_instance.get_dataset(tr_organization, tr_dataset, dataset_id)
print("The response of DatasetApi->get_dataset:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DatasetApi->get_dataset: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | str | The organization id to use for the request | |
tr_dataset | str | The dataset id to use for the request | |
dataset_id | str | The id of the dataset you want to retrieve. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Dataset retrieved successfully | - |
400 | Service error relating to retrieving the dataset | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[DatasetAndUsage] get_datasets_from_organization(tr_organization, organization_id)
Get Datasets from Organization
Get Datasets from Organization Get all datasets for an organization. The auth'ed user must be an admin or owner of the organization to get its datasets.
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.models.dataset_and_usage import DatasetAndUsage
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_organization = 'tr_organization_example' # str | The organization id to use for the request
organization_id = 'organization_id_example' # str | id of the organization you want to retrieve datasets for
try:
# Get Datasets from Organization
api_response = api_instance.get_datasets_from_organization(tr_organization, organization_id)
print("The response of DatasetApi->get_datasets_from_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DatasetApi->get_datasets_from_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | str | The organization id to use for the request | |
organization_id | str | id of the organization you want to retrieve datasets for |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Datasets retrieved successfully | - |
400 | Service error relating to retrieving the dataset | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Dataset update_dataset(tr_organization, update_dataset_request)
Update Dataset
Update Dataset Update a dataset. The auth'ed user must be an owner of the organization to update a dataset.
- Api Key Authentication (ApiKey):
import trieve_py_client
from trieve_py_client.models.dataset import Dataset
from trieve_py_client.models.update_dataset_request import UpdateDatasetRequest
from trieve_py_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.trieve.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = trieve_py_client.Configuration(
host = "https://api.trieve.ai"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_organization = 'tr_organization_example' # str | The organization id to use for the request
update_dataset_request = trieve_py_client.UpdateDatasetRequest() # UpdateDatasetRequest | JSON request payload to update a dataset
try:
# Update Dataset
api_response = api_instance.update_dataset(tr_organization, update_dataset_request)
print("The response of DatasetApi->update_dataset:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DatasetApi->update_dataset: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | str | The organization id to use for the request | |
update_dataset_request | UpdateDatasetRequest | JSON request payload to update a dataset |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Dataset updated successfully | - |
400 | Service error relating to updating the dataset | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]