Workflows.Deployments

June 23, 2026 ยท View on GitHub

Overview

Available Operations

list_deployments

List Deployments

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.workflows.deployments.list_deployments(active_only=True)

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
active_onlyOptional[bool]:heavy_minus_sign:N/A
is_hardenedOptionalNullable[bool]:heavy_minus_sign:Filter deployments by hardened status
workflow_nameOptionalNullable[str]:heavy_minus_sign:N/A
searchOptionalNullable[str]:heavy_minus_sign:Filter deployments by name or ID prefix
limitOptionalNullable[int]:heavy_minus_sign:Maximum number of deployments to return
cursorOptionalNullable[str]:heavy_minus_sign:Cursor from a previous response for pagination
workspace_idOptionalNullable[str]:heavy_minus_sign:Workspace ID to scope the request to. Defaults to the caller's context.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeploymentListResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

get_deployment

Get Deployment

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.workflows.deployments.get_deployment(name="<value>")

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
namestr:heavy_check_mark:N/A
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeploymentDetailResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

get_deployment_logs

Retrieve logs for a deployment (across all of its workers).

Use after/before/order on the first request to set the time range and sort order; for the next pages pass the cursor from the previous response (it remembers the range and order).

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.workflows.deployments.get_deployment_logs(name="<value>", order="asc", limit=50)

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescription
namestr:heavy_check_mark:N/A
worker_nameOptionalNullable[str]:heavy_minus_sign:Filter logs by worker name
workflow_nameOptionalNullable[str]:heavy_minus_sign:Filter logs by workflow name
afterdate:heavy_minus_sign:Only return logs at or after this timestamp
beforedate:heavy_minus_sign:Only return logs before this timestamp
orderOptional[models.GetDeploymentLogsOrder]:heavy_minus_sign:First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when cursor is set.
cursorOptionalNullable[str]:heavy_minus_sign:Pagination cursor from a previous response's next_cursor; carries the window and order
limitOptional[int]:heavy_minus_sign:Maximum number of logs to return
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeploymentLogSearchResponse

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*

stream_deployment_logs

Stream logs for a deployment (all of its workers) via SSE.

Resume cursor comes from the Last-Event-ID header or last_event_id query param (header wins) and takes precedence over after; omit all to tail from the deployment start.

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.workflows.deployments.stream_deployment_logs(name="<value>")

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

Parameters

ParameterTypeRequiredDescription
namestr:heavy_check_mark:N/A
worker_nameOptionalNullable[str]:heavy_minus_sign:Filter logs by worker name
workflow_nameOptionalNullable[str]:heavy_minus_sign:Filter logs by workflow name
afterdate:heavy_minus_sign:Start a fresh stream at this timestamp (ignored when resuming via last_event_id)
last_event_idOptionalNullable[str]:heavy_minus_sign:Resume from this cursor (a prior response's SSE id)
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

Union[eventstreaming.EventStream[models.StreamDeploymentLogsResponseBody], eventstreaming.EventStreamAsync[models.StreamDeploymentLogsResponseBody]]

Errors

Error TypeStatus CodeContent Type
errors.HTTPValidationError422application/json
errors.SDKError4XX, 5XX*/*