All URIs are relative to https://api.mixpeek.com
| Method | HTTP request | Description |
|---|---|---|
| create_retriever_template_from | POST /v1/templates/retrievers/from-retriever/{retriever_id} | Create Retriever Template |
| get_retriever_template | GET /v1/templates/retrievers/{template_id} | Get Retriever Template |
| instantiate_retriever_template | POST /v1/templates/retrievers/{template_id}/instantiate | Instantiate Retriever Template |
| list_retriever_templates | POST /v1/templates/retrievers | List Retriever Templates |
CreateTemplateFromResourceResponse create_retriever_template_from(retriever_id, create_template_from_resource_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Create Retriever Template
Create template from existing retriever.
Supports three template scopes:
- organization: Available to all users in your organization (default)
- user: Available only to you
- system: Available to all organizations (requires Mixpeek admin email)
import mixpeek
from mixpeek.models.create_template_from_resource_request import CreateTemplateFromResourceRequest
from mixpeek.models.create_template_from_resource_response import CreateTemplateFromResourceResponse
from mixpeek.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mixpeek.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mixpeek.Configuration(
host = "https://api.mixpeek.com"
)
# Enter a context with an instance of the API client
with mixpeek.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mixpeek.RetrieverTemplatesApi(api_client)
retriever_id = 'retriever_id_example' # str | Retriever ID
create_template_from_resource_request = mixpeek.CreateTemplateFromResourceRequest() # CreateTemplateFromResourceRequest |
authorization = 'authorization_example' # str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. (optional)
authorization2 = 'authorization_example' # str | (optional)
x_namespace = 'x_namespace_example' # str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' (optional)
try:
# Create Retriever Template
api_response = api_instance.create_retriever_template_from(retriever_id, create_template_from_resource_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of RetrieverTemplatesApi->create_retriever_template_from:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RetrieverTemplatesApi->create_retriever_template_from: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| retriever_id | str | Retriever ID | |
| create_template_from_resource_request | CreateTemplateFromResourceRequest | ||
| authorization | str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. | [optional] |
| authorization2 | str | [optional] | |
| x_namespace | str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' | [optional] |
CreateTemplateFromResourceResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BaseTemplateModel get_retriever_template(template_id, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Get Retriever Template
Get retriever template details.
import mixpeek
from mixpeek.models.base_template_model import BaseTemplateModel
from mixpeek.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mixpeek.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mixpeek.Configuration(
host = "https://api.mixpeek.com"
)
# Enter a context with an instance of the API client
with mixpeek.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mixpeek.RetrieverTemplatesApi(api_client)
template_id = 'template_id_example' # str | Template ID
authorization = 'authorization_example' # str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. (optional)
authorization2 = 'authorization_example' # str | (optional)
x_namespace = 'x_namespace_example' # str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' (optional)
try:
# Get Retriever Template
api_response = api_instance.get_retriever_template(template_id, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of RetrieverTemplatesApi->get_retriever_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RetrieverTemplatesApi->get_retriever_template: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| template_id | str | Template ID | |
| authorization | str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. | [optional] |
| authorization2 | str | [optional] | |
| x_namespace | str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstantiatedRetrieverTemplateResponse instantiate_retriever_template(template_id, instantiate_retriever_template_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Instantiate Retriever Template
Instantiate retriever template.
import mixpeek
from mixpeek.models.instantiate_retriever_template_request import InstantiateRetrieverTemplateRequest
from mixpeek.models.instantiated_retriever_template_response import InstantiatedRetrieverTemplateResponse
from mixpeek.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mixpeek.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mixpeek.Configuration(
host = "https://api.mixpeek.com"
)
# Enter a context with an instance of the API client
with mixpeek.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mixpeek.RetrieverTemplatesApi(api_client)
template_id = 'template_id_example' # str | Template ID
instantiate_retriever_template_request = mixpeek.InstantiateRetrieverTemplateRequest() # InstantiateRetrieverTemplateRequest |
authorization = 'authorization_example' # str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. (optional)
authorization2 = 'authorization_example' # str | (optional)
x_namespace = 'x_namespace_example' # str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' (optional)
try:
# Instantiate Retriever Template
api_response = api_instance.instantiate_retriever_template(template_id, instantiate_retriever_template_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of RetrieverTemplatesApi->instantiate_retriever_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RetrieverTemplatesApi->instantiate_retriever_template: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| template_id | str | Template ID | |
| instantiate_retriever_template_request | InstantiateRetrieverTemplateRequest | ||
| authorization | str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. | [optional] |
| authorization2 | str | [optional] | |
| x_namespace | str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' | [optional] |
InstantiatedRetrieverTemplateResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListTemplatesResponse list_retriever_templates(authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_templates_request=list_templates_request)
List Retriever Templates
List retriever templates (system + organization + user).
Supports filtering, sorting, and search like other list operations.
Request Body (optional):
filters: Attribute-based filters{"AND": [{"field": "category", "operator": "eq", "value": "semantic_search"}]}sort: Sort options{"field": "name", "direction": "asc"}search: Wildcard search across template_id, name, description, tagsscope: Filter by scope (system, organization, user)category: Filter by categoryis_active: Show only active templates (default: true)tags: Filter by tags (templates must have ALL specified tags)
import mixpeek
from mixpeek.models.list_templates_request import ListTemplatesRequest
from mixpeek.models.list_templates_response import ListTemplatesResponse
from mixpeek.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mixpeek.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mixpeek.Configuration(
host = "https://api.mixpeek.com"
)
# Enter a context with an instance of the API client
with mixpeek.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mixpeek.RetrieverTemplatesApi(api_client)
authorization = 'authorization_example' # str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. (optional)
authorization2 = 'authorization_example' # str | (optional)
x_namespace = 'x_namespace_example' # str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' (optional)
list_templates_request = mixpeek.ListTemplatesRequest() # ListTemplatesRequest | (optional)
try:
# List Retriever Templates
api_response = api_instance.list_retriever_templates(authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_templates_request=list_templates_request)
print("The response of RetrieverTemplatesApi->list_retriever_templates:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RetrieverTemplatesApi->list_retriever_templates: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| authorization | str | REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings. | [optional] |
| authorization2 | str | [optional] | |
| x_namespace | str | REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace' | [optional] |
| list_templates_request | ListTemplatesRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]