All URIs are relative to https://api.mixpeek.com
| Method | HTTP request | Description |
|---|---|---|
| get_task | GET /v1/tasks/{task_id} | Get Task Information |
| kill_task | DELETE /v1/tasks/{task_id} | Kill Task |
| list_tasks | POST /v1/tasks/list | List Tasks |
TaskResponse get_task(task_id, authorization=authorization)
Get Task Information
Retrieve a task by its ID.
A task may have an expiration time, after which it will still be returned but marked as expired.
This allows tracking of historical tasks while indicating their current validity state.
import mixpeek
from mixpeek.models.task_response import TaskResponse
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.TasksApi(api_client)
task_id = 'task_id_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)
try:
# Get Task Information
api_response = api_instance.get_task(task_id, authorization=authorization)
print("The response of TasksApi->get_task:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TasksApi->get_task: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| task_id | 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] |
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]
GenericDeleteResponse kill_task(task_id, authorization=authorization)
Kill Task
Kill a task (idempotent - succeeds even if task doesn't exist or is already killed).
import mixpeek
from mixpeek.models.generic_delete_response import GenericDeleteResponse
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.TasksApi(api_client)
task_id = 'task_id_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)
try:
# Kill Task
api_response = api_instance.kill_task(task_id, authorization=authorization)
print("The response of TasksApi->kill_task:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TasksApi->kill_task: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| task_id | 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] |
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]
ListTasksResponse list_tasks(limit=limit, offset=offset, cursor=cursor, include_total=include_total, authorization=authorization, list_tasks_request=list_tasks_request)
List Tasks
List tasks with optional filtering, sorting, and pagination.
**Filter Options**:
- `status`: Filter by specific status (PENDING, IN_PROGRESS, COMPLETED, FAILED, etc.)
- `task_type`: Filter by task type
**Examples**:
- All tasks: `{}`
- Failed tasks only: `{"status": "FAILED"}`
- Pending batches: `{"status": "PENDING", "task_type": "API_BUCKETS_UPLOADS_BATCH_CONFIRM"}`
- In-progress tasks: `{"status": "IN_PROGRESS"}`
import mixpeek
from mixpeek.models.list_tasks_request import ListTasksRequest
from mixpeek.models.list_tasks_response import ListTasksResponse
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.TasksApi(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)
list_tasks_request = mixpeek.ListTasksRequest() # ListTasksRequest | (optional)
try:
# List Tasks
api_response = api_instance.list_tasks(limit=limit, offset=offset, cursor=cursor, include_total=include_total, authorization=authorization, list_tasks_request=list_tasks_request)
print("The response of TasksApi->list_tasks:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling TasksApi->list_tasks: %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] |
| list_tasks_request | ListTasksRequest | [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]