All URIs are relative to https://api.mixpeek.com
| Method | HTTP request | Description |
|---|---|---|
| clone_collection | POST /v1/collections/{collection_identifier}/clone | Clone Collection |
| create_collection | POST /v1/collections | Create Collection |
| delete_collection | DELETE /v1/collections/{collection_identifier} | Delete Collection |
| describe_collection_features | GET /v1/collections/{collection_identifier}/features | Describe collection features |
| export_collection | POST /v1/collections/{collection_identifier}/export | Export Collection |
| get_collection | GET /v1/collections/{collection_identifier} | Get Collection |
| list_collections | POST /v1/collections/list | List Collections |
| trigger_collection | POST /v1/collections/{collection_identifier}/trigger | Trigger Collection Processing |
| update_collection | PATCH /v1/collections/{collection_identifier} | Update Collection |
CloneCollectionResponse clone_collection(collection_identifier, clone_collection_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Clone Collection
Clone a collection with optional modifications.
**Purpose:**
Creates a NEW collection (with new ID) based on an existing one. This is the
recommended way to iterate on collection designs when you need to modify core
configuration that PATCH doesn't allow (source, feature_extractor, field_passthrough).
**Clone vs PATCH vs Template:**
- **PATCH**: Update metadata only (enabled, metadata, taxonomy_applications)
- **Clone**: Copy and modify core configuration (source, feature_extractor)
- **Template**: Start from a pre-configured pattern (for new projects)
**Common Use Cases:**
- Change feature extractor configuration (model, parameters)
- Modify field_passthrough to include/exclude fields
- Switch to different source (bucket or collection)
- Test modifications before replacing production collection
- Create variants (e.g., different embedding models)
**How it works:**
1. Source collection is copied
2. You provide a new name (REQUIRED)
3. Optionally override any other fields
4. A new collection is created with a new ID
5. Original collection remains unchanged
import mixpeek
from mixpeek.models.clone_collection_request import CloneCollectionRequest
from mixpeek.models.clone_collection_response import CloneCollectionResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | Source collection ID or name to clone.
clone_collection_request = mixpeek.CloneCollectionRequest() # CloneCollectionRequest |
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:
# Clone Collection
api_response = api_instance.clone_collection(collection_identifier, clone_collection_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->clone_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->clone_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | Source collection ID or name to clone. | |
| clone_collection_request | CloneCollectionRequest | ||
| 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: 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]
CollectionResponse create_collection(create_collection_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Create Collection
Create a new processing collection linked to a namespace.
A collection defines the feature extraction pipeline that runs when objects are uploaded to a bucket. One feature extractor per collection.
Custom plugin collections:
When feature_extractor_name references a custom plugin, the collection's vector
indexes are read from the plugin's manifest.py features list. The features
entries must use these exact key names — wrong keys silently produce a collection
with no vector indexes and 0 documents will be written:
{
"feature_type": "embedding",
"feature_name": "my_embedding",
"embedding_dim": 768,
"distance_metric": "cosine"
}Common wrong keys (will be ignored): type, name, dimensions, distance.
Vector schema: Custom plugin vectors are automatically added to the namespace's Qdrant collection the first time a batch is processed, so there is no need to recreate the namespace when adding a plugin with new embedding types.
import mixpeek
from mixpeek.models.collection_response import CollectionResponse
from mixpeek.models.create_collection_request import CreateCollectionRequest
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.CollectionsApi(api_client)
create_collection_request = mixpeek.CreateCollectionRequest() # CreateCollectionRequest |
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 Collection
api_response = api_instance.create_collection(create_collection_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->create_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->create_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_collection_request | CreateCollectionRequest | ||
| 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: 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]
object delete_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Delete Collection
This endpoint deletes a collection and all its resources including: - Qdrant points (documents) with this collection_id - Cache entries - MongoDB collection metadata
Note: Collections are payload IDs within the namespace's Qdrant collection,
not separate Qdrant collections.
The deletion is performed synchronously and returns when complete.
import mixpeek
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to delete
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:
# Delete Collection
api_response = api_instance.delete_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->delete_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->delete_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to delete | |
| 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] |
object
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]
DescribeCollectionFeaturesResponse describe_collection_features(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Describe collection features
List feature addresses and metadata available in this collection
import mixpeek
from mixpeek.models.describe_collection_features_response import DescribeCollectionFeaturesResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to describe
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:
# Describe collection features
api_response = api_instance.describe_collection_features(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->describe_collection_features:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->describe_collection_features: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to describe | |
| 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] |
DescribeCollectionFeaturesResponse
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]
CollectionExportResponse export_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, collection_export_request=collection_export_request)
Export Collection
Export collection documents to JSON, CSV, or Parquet format.
**Export Formats:**
- **JSON**: Line-delimited JSON (JSONL) format. Good for streaming.
- **CSV**: Comma-separated values. Best for spreadsheets.
- **PARQUET**: Columnar format (default). Best for data pipelines.
**Vector Export:**
Vectors are large and exported separately. When `include_vectors=True`,
a separate file is created for vectors with document_id mapping.
**Field Selection:**
Use `select_fields` to export only specific fields, reducing file size.
**Filtering:**
Apply filters to export a subset of documents.
**Response:**
Returns presigned download URLs valid for 1 hour.
**Limits:**
- Large exports may take time. Consider using `sample_size` for testing.
- Vector exports significantly increase processing time.
import mixpeek
from mixpeek.models.collection_export_request import CollectionExportRequest
from mixpeek.models.collection_export_response import CollectionExportResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to export
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)
collection_export_request = mixpeek.CollectionExportRequest() # CollectionExportRequest | (optional)
try:
# Export Collection
api_response = api_instance.export_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, collection_export_request=collection_export_request)
print("The response of CollectionsApi->export_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->export_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to export | |
| 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] |
| collection_export_request | CollectionExportRequest | [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]
CollectionResponse get_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Get Collection
This endpoint allows you to retrieve a collection by ID or name.
import mixpeek
from mixpeek.models.collection_response import CollectionResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to retrieve
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 Collection
api_response = api_instance.get_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->get_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->get_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to retrieve | |
| 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]
ListCollectionsResponse list_collections(limit=limit, offset=offset, cursor=cursor, include_total=include_total, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_collections_request=list_collections_request)
List Collections
This endpoint allows you to list collections.
import mixpeek
from mixpeek.models.list_collections_request import ListCollectionsRequest
from mixpeek.models.list_collections_response import ListCollectionsResponse
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.CollectionsApi(api_client)
limit = 56 # int | (optional)
offset = 56 # int | (optional)
cursor = 'cursor_example' # str | (optional)
include_total = False # bool | (optional) (default to False)
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_collections_request = mixpeek.ListCollectionsRequest() # ListCollectionsRequest | (optional)
try:
# List Collections
api_response = api_instance.list_collections(limit=limit, offset=offset, cursor=cursor, include_total=include_total, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_collections_request=list_collections_request)
print("The response of CollectionsApi->list_collections:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->list_collections: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | [optional] | |
| offset | int | [optional] | |
| cursor | str | [optional] | |
| include_total | bool | [optional] [default to False] | |
| 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_collections_request | ListCollectionsRequest | [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]
TriggerCollectionResponse trigger_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, trigger_collection_request=trigger_collection_request)
Trigger Collection Processing
Process data through a collection - works for both bucket-sourced and collection-sourced collections.
**For bucket-sourced collections:**
Discovers objects from source bucket(s), creates a batch, and submits for processing.
Use `include_buckets` to limit which source buckets to process from.
**For collection-sourced collections:**
Processes existing documents from upstream collection(s).
Use `include_collections` to limit which source collections to process from.
**Filtering:**
- `source_filters`: Field-level filters using LogicalOperator format
- Example: `{"AND": [{"field": "status", "operator": "eq", "value": "pending"}]}`
- For specific objects: `{"AND": [{"field": "object_id", "operator": "in", "value": ["obj_1", "obj_2"]}]}`
**Returns:**
- batch_id: Track progress via GET /batches/{batch_id}
- task_id: Monitor via GET /tasks/{task_id}
import mixpeek
from mixpeek.models.trigger_collection_request import TriggerCollectionRequest
from mixpeek.models.trigger_collection_response import TriggerCollectionResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to trigger
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)
trigger_collection_request = mixpeek.TriggerCollectionRequest() # TriggerCollectionRequest | (optional)
try:
# Trigger Collection Processing
api_response = api_instance.trigger_collection(collection_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, trigger_collection_request=trigger_collection_request)
print("The response of CollectionsApi->trigger_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->trigger_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to trigger | |
| 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] |
| trigger_collection_request | TriggerCollectionRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | 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]
CollectionResponse update_collection(collection_identifier, request_body, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Update Collection
Update mutable collection fields (collection_name, description, taxonomy_applications, enabled)
import mixpeek
from mixpeek.models.collection_response import CollectionResponse
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.CollectionsApi(api_client)
collection_identifier = 'collection_identifier_example' # str | The ID or name of the collection to update
request_body = None # Dict[str, object] |
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:
# Update Collection
api_response = api_instance.update_collection(collection_identifier, request_body, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of CollectionsApi->update_collection:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CollectionsApi->update_collection: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| collection_identifier | str | The ID or name of the collection to update | |
| request_body | Dict[str, object] | ||
| 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: 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]