Skip to content

Latest commit

 

History

History
526 lines (375 loc) · 22.4 KB

File metadata and controls

526 lines (375 loc) · 22.4 KB

mixpeek.BucketsApi

All URIs are relative to https://api.mixpeek.com

Method HTTP request Description
create_bucket POST /v1/buckets Create Bucket
delete_bucket DELETE /v1/buckets/{bucket_identifier} Delete Bucket
get_bucket GET /v1/buckets/{bucket_identifier} Get Bucket
list_buckets POST /v1/buckets/list List Buckets
patch_bucket PATCH /v1/buckets/{bucket_identifier} Partially Update Bucket
update_bucket PUT /v1/buckets/{bucket_identifier} Update Bucket

create_bucket

BucketResponse create_bucket(bucket_create_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)

Create Bucket

This endpoint allows you to create a new bucket with a defined schema. A bucket is a collection of objects that conform to the schema. The schema defines the structure and validation rules for objects in the bucket.

Example

import mixpeek
from mixpeek.models.bucket_create_request import BucketCreateRequest
from mixpeek.models.bucket_response import BucketResponse
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.BucketsApi(api_client)
    bucket_create_request = mixpeek.BucketCreateRequest() # BucketCreateRequest | 
    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 Bucket
        api_response = api_instance.create_bucket(bucket_create_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
        print("The response of BucketsApi->create_bucket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->create_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_create_request BucketCreateRequest
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]

Return type

BucketResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

delete_bucket

object delete_bucket(bucket_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)

Delete Bucket

This endpoint deletes a bucket and all its resources including: - S3 objects and blobs - Running Ray jobs (cancels active batch processing jobs) - Batch processing artifacts - Upload files - Unique key lookups - MongoDB metadata

The deletion is performed **asynchronously** via a background task.
Returns immediately with a task_id that can be polled via GET /v1/tasks/{task_id}.

**Response**:
- `task_id`: Use this to poll deletion status via GET /v1/tasks/{task_id}
- `status`: Initial status (PENDING)
- `bucket_id`: The bucket being deleted
- `bucket_name`: Name of the bucket
- `object_count`: Number of objects that will be deleted

**Polling**:
Poll GET /v1/tasks/{task_id} until status is COMPLETED or FAILED.
Use exponential backoff (start 1s, max 30s).

Example

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.BucketsApi(api_client)
    bucket_identifier = 'bucket_identifier_example' # str | 
    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 Bucket
        api_response = api_instance.delete_bucket(bucket_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
        print("The response of BucketsApi->delete_bucket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->delete_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_identifier str
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]

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

get_bucket

BucketResponse get_bucket(bucket_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)

Get Bucket

This endpoint retrieves a bucket by its ID.

Example

import mixpeek
from mixpeek.models.bucket_response import BucketResponse
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.BucketsApi(api_client)
    bucket_identifier = 'bucket_identifier_example' # str | 
    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 Bucket
        api_response = api_instance.get_bucket(bucket_identifier, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
        print("The response of BucketsApi->get_bucket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->get_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_identifier str
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]

Return type

BucketResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

list_buckets

ListBucketsResponse list_buckets(authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_buckets_request=list_buckets_request)

List Buckets

This endpoint lists buckets with pagination, sorting, and filtering options.

Example

import mixpeek
from mixpeek.models.list_buckets_request import ListBucketsRequest
from mixpeek.models.list_buckets_response import ListBucketsResponse
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.BucketsApi(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_buckets_request = mixpeek.ListBucketsRequest() # ListBucketsRequest |  (optional)

    try:
        # List Buckets
        api_response = api_instance.list_buckets(authorization=authorization, authorization2=authorization2, x_namespace=x_namespace, list_buckets_request=list_buckets_request)
        print("The response of BucketsApi->list_buckets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->list_buckets: %s\n" % e)

Parameters

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_buckets_request ListBucketsRequest [optional]

Return type

ListBucketsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

patch_bucket

BucketResponse patch_bucket(bucket_identifier, bucket_patch_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)

Partially Update Bucket

This endpoint allows you to partially update an existing bucket (PATCH operation). Only provided fields will be updated. At minimum, metadata can always be updated. Immutable fields like bucket_id and timestamps cannot be modified.

Example

import mixpeek
from mixpeek.models.bucket_patch_request import BucketPatchRequest
from mixpeek.models.bucket_response import BucketResponse
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.BucketsApi(api_client)
    bucket_identifier = 'bucket_identifier_example' # str | 
    bucket_patch_request = mixpeek.BucketPatchRequest() # BucketPatchRequest | 
    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:
        # Partially Update Bucket
        api_response = api_instance.patch_bucket(bucket_identifier, bucket_patch_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
        print("The response of BucketsApi->patch_bucket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->patch_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_identifier str
bucket_patch_request BucketPatchRequest
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]

Return type

BucketResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

update_bucket

BucketResponse update_bucket(bucket_identifier, bucket_update_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)

Update Bucket

This endpoint allows you to update an existing bucket. You can update the bucket's name, description, and metadata.

Example

import mixpeek
from mixpeek.models.bucket_response import BucketResponse
from mixpeek.models.bucket_update_request import BucketUpdateRequest
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.BucketsApi(api_client)
    bucket_identifier = 'bucket_identifier_example' # str | 
    bucket_update_request = mixpeek.BucketUpdateRequest() # BucketUpdateRequest | 
    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 Bucket
        api_response = api_instance.update_bucket(bucket_identifier, bucket_update_request, authorization=authorization, authorization2=authorization2, x_namespace=x_namespace)
        print("The response of BucketsApi->update_bucket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BucketsApi->update_bucket: %s\n" % e)

Parameters

Name Type Description Notes
bucket_identifier str
bucket_update_request BucketUpdateRequest
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]

Return type

BucketResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]