All URIs are relative to https://api.mixpeek.com
| Method | HTTP request | Description |
|---|---|---|
| create_namespace_template_from | POST /v1/templates/namespaces/from-namespace/{namespace_id} | Create Namespace Template |
| get_namespace_template | GET /v1/templates/namespaces/{template_id} | Get Namespace Template |
| instantiate_namespace_template | POST /v1/templates/namespaces/{template_id}/instantiate | Instantiate Namespace Template |
| list_namespace_templates | GET /v1/templates/namespaces | List Namespace Templates |
CreateTemplateFromResourceResponse create_namespace_template_from(namespace_id, create_template_from_resource_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Create Namespace Template
Create template from existing namespace.
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.NamespaceTemplatesApi(api_client)
namespace_id = 'namespace_id_example' # str | Namespace 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 Namespace Template
api_response = api_instance.create_namespace_template_from(namespace_id, create_template_from_resource_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of NamespaceTemplatesApi->create_namespace_template_from:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NamespaceTemplatesApi->create_namespace_template_from: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| namespace_id | str | Namespace 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_namespace_template(template_id, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Get Namespace Template
Get namespace 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.NamespaceTemplatesApi(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 Namespace Template
api_response = api_instance.get_namespace_template(template_id, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of NamespaceTemplatesApi->get_namespace_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NamespaceTemplatesApi->get_namespace_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]
InstantiatedTemplateResponse instantiate_namespace_template(template_id, instantiate_template_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
Instantiate Namespace Template
Instantiate namespace template.
import mixpeek
from mixpeek.models.instantiate_template_request import InstantiateTemplateRequest
from mixpeek.models.instantiated_template_response import InstantiatedTemplateResponse
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.NamespaceTemplatesApi(api_client)
template_id = 'template_id_example' # str | Template ID
instantiate_template_request = mixpeek.InstantiateTemplateRequest() # InstantiateTemplateRequest |
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 Namespace Template
api_response = api_instance.instantiate_namespace_template(template_id, instantiate_template_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of NamespaceTemplatesApi->instantiate_namespace_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NamespaceTemplatesApi->instantiate_namespace_template: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| template_id | str | Template ID | |
| instantiate_template_request | InstantiateTemplateRequest | ||
| 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]
List[BaseTemplateModel] list_namespace_templates(category=category, scope=scope, is_active=is_active, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
List Namespace Templates
List namespace templates (system + organization + user).
import mixpeek
from mixpeek.models.base_template_model import BaseTemplateModel
from mixpeek.models.template_scope import TemplateScope
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.NamespaceTemplatesApi(api_client)
category = 'category_example' # str | Filter by category (optional)
scope = mixpeek.TemplateScope() # TemplateScope | Filter by scope (system, organization, or user) (optional)
is_active = True # bool | Show only active templates (optional) (default to True)
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:
# List Namespace Templates
api_response = api_instance.list_namespace_templates(category=category, scope=scope, is_active=is_active, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
print("The response of NamespaceTemplatesApi->list_namespace_templates:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling NamespaceTemplatesApi->list_namespace_templates: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| category | str | Filter by category | [optional] |
| scope | TemplateScope | Filter by scope (system, organization, or user) | [optional] |
| is_active | bool | Show only active templates | [optional] [default to True] |
| 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]