mistralM

Docs

sideBar

Workflows Deployments

Workflows API - deployments.

POST /v1/workflows/deployments/{deployment_id}/unharden

Unharden Deployment

Unharden Deployment

Parameters

deployment_id
stringpath* required
workspace_id
string | nullquery

Workspace ID to scope the request to. Defaults to the caller's context.

GET /v1/workflows/deployments

List Deployments

List Deployments

Parameters

active_only
booleanquery
is_hardened
boolean | nullquery

Filter deployments by hardened status

workflow_name
string | nullquery
created_by
string | nullquery

Filter deployments by creator's user id

owner
string | nullquery

Filter deployments by owner's user id

location_types
array<"local" | "k8s" | "managed"> | nullquery

Filter deployments with at least one worker on any of these location types (OR)

string | nullquery

Filter deployments by name or ID prefix

order_by
"updated_at" | "created_at"query

Field to sort by. When omitted, active and managed deployments are grouped first, then sorted by created_at. When set, results are sorted purely by the specified field with no grouping.

order
"asc" | "desc"query

Sort direction. Applied to order_by when set, or within each activity group when omitted.

limit
integerquery

Maximum number of deployments to return

cursor
string | nullquery

Cursor from a previous response for pagination

workspace_id
string | nullquery

Workspace ID to scope the request to. Defaults to the caller's context.

repository_url
string | nullquery

Filter managed deployments by source repository URL (exact match)

dockerfile_path
string | nullquery

Filter managed deployments by Dockerfile path (exact match)

Responses

Successful Response

deployments
array<DeploymentResponse>* required

List of deployments

DeploymentResponse
active_worker_count
integer

Number of workers currently live within the liveness cutoff

Default Value: 0

created_at
date-time* required

When the deployment was first registered

id
string* required

Unique identifier of the deployment

is_active
boolean* required

Whether at least one worker is currently live

is_hardened
boolean

Whether the deployment only accepts registrations from authorized principals

Default Value: false

last_heartbeat
date-time* required

When the deployment last saw a worker registration

location
DeploymentLocation | null

Where the deployment is running

DeploymentLocation

Where the deployment is running

k8s_cluster
string | null

K8s cluster name, if applicable

k8s_namespace
string | null

K8s namespace, if applicable

location_type
"local" | "k8s" | "managed"* required
locations
array<"local" | "k8s" | "managed"> | null

Filter deployments with at least one worker on any of these location types (OR)

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null
name
string* required

Deployment name

owner
string | null

User id that owns the deployment, or null when it is administrator-managed

updated_at
date-time* required
exclamationMark

Deprecated alias of last_heartbeat

worker_count
integer

Number of workers registered to the deployment

Default Value: 0

next_cursor
string | null* required

Cursor for the next page of results

workspace_id
string* required

Workspace ID the results are scoped to

POST /v1/workflows/deployments

Create Deployment

Create Deployment

Request Example

{
  "name": "ipsum eiusmod",
  "spec": {}
}

Request Body

hardened
boolean

Default Value: false

name
string* required
DeploymentResourceConfig
replicas
integer | null
DeploymentWorkerSpecInput
archive_id
string | null

Mistral Cloud archive to build the worker from instead of a repository. The archive is the whole build context: 'dockerfile_path' is relative to its root, and 'build_directory' must be unset.

Worker configuration for the Mistral Cloud backend.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

github_url
string | null
exclamationMark

Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'.

repository_url
string | null

Repository to build the worker from, set instead of 'archive_id': a GitHub repository (https://github.com/&lt;owner&gt;/&lt;repo&gt;) or a repository on the Mistral git server (https://api.globalaegis.net/v1/git/&lt;workspace&gt;/&lt;repo&gt;.git). On the git server you must be able to read the repository; the worker builds from an archive of 'revision' and 'build_directory'.

requested_roles
array<string> | null

Workspace roles, by name, that the deployment's service account holds beyond workflow_executor. Granted only if the deploying user holds them.

revision
string | null

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

GET /v1/workflows/deployments/{name}

Get Deployment

Get Deployment

Parameters

name
stringpath* required
workflow_name
string | nullquery

Scope serving status to this workflow

Responses

Successful Response

active_worker_count
integer

Number of workers currently live within the liveness cutoff

Default Value: 0

created_at
date-time* required

When the deployment was first registered

id
string* required

Unique identifier of the deployment

is_active
boolean* required

Whether at least one worker is currently live

is_hardened
boolean

Whether the deployment only accepts registrations from authorized principals

Default Value: false

last_heartbeat
date-time* required

When the deployment last saw a worker registration

location
DeploymentLocation | null

Where the deployment is running

DeploymentLocation

Where the deployment is running

k8s_cluster
string | null

K8s cluster name, if applicable

k8s_namespace
string | null

K8s namespace, if applicable

location_type
"local" | "k8s" | "managed"* required
locations
array<"local" | "k8s" | "managed"> | null

Filter deployments with at least one worker on any of these location types (OR)

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null
name
string* required

Deployment name

owner
string | null

User id that owns the deployment, or null when it is administrator-managed

updated_at
date-time* required
exclamationMark

Deprecated alias of last_heartbeat

worker_count
integer

Number of workers registered to the deployment

Default Value: 0

workers
array<DeploymentWorkerResponse>* required

Workers registered for the deployment

DeploymentWorkerResponse
created_at
date-time* required

When the worker first registered

is_active
boolean* required

Whether this worker's liveness key is currently alive

last_heartbeat
date-time* required

When the worker last registered

location
DeploymentLocation | null

Where the deployment is running

DeploymentLocation

Where the deployment is running

k8s_cluster
string | null

K8s cluster name, if applicable

k8s_namespace
string | null

K8s namespace, if applicable

location_type
"local" | "k8s" | "managed"* required
name
string* required

Worker name

updated_at
date-time* required
exclamationMark

Deprecated alias of last_heartbeat

DELETE /v1/workflows/deployments/{name}

Delete Deployment

Delete Deployment

Parameters

name
stringpath* required

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

PATCH /v1/workflows/deployments/{name}

Update Deployment

Update Deployment

Parameters

name
stringpath* required

Request Example

{}

Request Body

DeploymentResourceConfigUpdate
replicas
integer | null
WorkflowsWorkerSpecUpdate
archive_id
string | null

Rebuild the worker from this archive, dropping 'repository_url' and 'revision'. Sending 'repository_url' instead moves it back to a repository.

Worker configuration for the Mistral Cloud backend.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

github_url
string | null
exclamationMark

Deprecated alias of 'repository_url' for a GitHub repository. Set only 'repository_url'.

repository_url
string | null

Rebuild the worker from this repository, on GitHub or the git server, dropping 'archive_id'.

requested_roles
array<string> | null

The complete workspace-role set after the update, beyond workflow_executor. Replaces the current roles; omit it to leave them unchanged, send an empty list to drop all extras. Granted only if the deploying user holds them.

revision
string | null

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

POST /v1/workflows/deployments/{name}/stop

Stop Deployment

Stop Deployment

Parameters

name
stringpath* required

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

POST /v1/workflows/deployments/{name}/start

Start Deployment

Start Deployment

Parameters

name
stringpath* required

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

POST /v1/workflows/deployments/{name}/restart

Restart Deployment

Restart Deployment

Parameters

name
stringpath* required

Server-Side Events

ManagedDeploymentResponse | null

Successful Response

ManagedDeploymentResponse

Live managed service state for managed deployments; null for self-hosted deployments or when managed services are unavailable

created_at
date-time* required
created_by
string | null
deployed_at
date-time | null
deployed_by
string | null
is_hardened
boolean

Default Value: false

name
string* required
resources
DeploymentResourceConfig* required
DeploymentResourceConfig
replicas
integer | null
rollout_status
string | null
runtime_credential_id
string | null
runtime_principal_type
"api_key" | "service_account" | "user"
service_id
string* required
DeploymentWorkerSpecResponse
archive_id
string | null

Archive the worker builds from, if any.

Backend-specific configuration. 'mistral_cloud' is Mistral Cloud; 'kubernetes' is a deployment that already runs on Kubernetes.

DeploymentMistralCloudBackendSpec

Worker configuration for the Mistral Cloud backend.

build_directory
string | null

Docker build context, as a path in the repo. Defaults to the repo root.

dockerfile_path
string | null

Path to the Dockerfile, relative to 'build_directory'. Defaults to 'Dockerfile'.

secrets
array<DeploymentSecretBinding> | null

Secrets to bind to the worker, as 'secret:workspace:<NAME>' references. Each is available during build and run: as a Dockerfile build arg (declare a matching 'ARG') and as an env var. On update, the field carries the complete set: send the full list to rebind, an empty list to unbind all, omit it to leave the bindings unchanged.

DeploymentSecretBinding

Binds one env var to one platform secret; the value is resolved at boot, never stored.

env_var_name
string* required

Environment variable the worker process reads; the secret's name lives in 'reference'.

reference
string* required

Secret reference as 'secret:workspace:<NAME>'. Resolved at boot by the runtime-init container; the value never reaches the control plane.

type
"mistral_cloud" | "koyeb"

Default Value: "mistral_cloud"

DeploymentK8sBackendSpec

Worker configuration for the Kubernetes backend.

entrypoint
string | null

Either a 'module:function' reference (e.g. 'worker:main') or a '.py' script path relative to 'working_dir'.

type
string

Default Value: "kubernetes"

working_dir
string | null

Path in the repo holding the worker's pyproject.toml, for monorepo layouts. Leave empty for single-package repos.

commit
GitCommitMetadata | null
GitCommitMetadata
author
GitCommitAuthor | null
GitCommitAuthor
html_url
string | null
name
string | null
username
string | null
html_url
string | null
message
string | null
sha
string* required
github_url
string* required

GitHub repository the worker builds from. Empty for a worker built from an archive.

repository_url
string | null

Repository the worker builds from, on GitHub or the git server, if any.

requested_roles
array<string> | null
restarted_at
string | null
revision
string | null
type
string

Default Value: "workflows_worker"

status
DeploymentObservedState* required
DeploymentObservedState
available_replicas
integer

Default Value: 0

build_state
DeploymentBuildState | null
DeploymentBuildState
commit_sha
string | null
finished_at
date-time | null
image
string | null
message
string | null
phase
string | null
started_at
date-time | null
deployed_revision
string | null
endpoint
string | null
generation
integer | null
last_phase_changed_at
date-time | null
last_seen
date-time | null
message
string | null
phase
string | null
ready_replicas
integer

Default Value: 0

stopped
boolean

Default Value: false

updated_at
date-time* required
updated_by
string | null

GET /v1/workflows/deployments/{name}/workers

List Deployment Workers

List Deployment Workers

Parameters

name
stringpath* required
worker_status
"active" | "inactive"query

Filter by worker activity. active=only active, inactive=only inactive, None=no filter

limit
integerquery

Maximum number of workers to return

cursor
string | nullquery

Cursor from a previous response's next_cursor. Resend worker_status unchanged alongside it.

Responses

Successful Response

next_cursor
string | null* required

Cursor for the next page of results

workers
array<DeploymentWorkerResponse>* required

Workers registered for the deployment

DeploymentWorkerResponse
created_at
date-time* required

When the worker first registered

is_active
boolean* required

Whether this worker's liveness key is currently alive

last_heartbeat
date-time* required

When the worker last registered

location
DeploymentLocation | null

Where the deployment is running

DeploymentLocation

Where the deployment is running

k8s_cluster
string | null

K8s cluster name, if applicable

k8s_namespace
string | null

K8s namespace, if applicable

location_type
"local" | "k8s" | "managed"* required
name
string* required

Worker name

updated_at
date-time* required
exclamationMark

Deprecated alias of last_heartbeat

GET /v1/workflows/deployments/{name}/archive

Get Deployment Archive

Get the archive a managed deployment builds from, with a signed URL to download it.

download_url expires within 24 hours, and is null once Mistral Cloud has deleted the archive. A deployment that builds from a repository answers 404.

Parameters

name
stringpath* required

Responses

Successful Response

archive_id
string* required

Mistral Cloud archive the worker builds from

download_url
string | null

A signed URL to download the archive, which expires within 24 hours. Null once Mistral Cloud has deleted the archive.

POST /v1/workflows/deployments/archives

Create Deployment Archive

Create an empty archive, with a signed URL to upload the tarball a managed deployment builds from.

PUT the gzipped tar to upload_url with upload_headers, then pass archive_id in the spec on create or update.

Request Example

{
  "size": 87
}

Request Body

The size of the gzipped tar a managed deployment will build from.

size
integerMax: 268435456* required

Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size.

Server-Side Events

Successful Response

archive_id
string* required

Pass it as the spec's archive_id once the upload has finished.

upload_headers
map<string>* required

Headers the PUT must send for the signed URL to accept it.

upload_url
string* required

A signed URL to PUT the tarball to. It grants write access, so keep it secret.

GET /v1/workflows/deployments/{name}/logs

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).

log_type=build serves the managed build pipeline's output instead. It pages the same way, and a null next_cursor means the window is drained.

Parameters

name
stringpath* required
log_type
"build" | "runtime"query

Which stream to read. 'runtime' is the workers' own logs; 'build' reads the image build output and requires a managed deployment.

worker_name
string | nullquery

Filter logs by worker name

workflow_name
string | nullquery

Filter logs by workflow name

after
date-time | nullquery

Only return logs at or after this timestamp

before
date-time | nullquery

Only return logs before this timestamp

order
"asc" | "desc"query

First-page sort order: 'asc' (oldest first) or 'desc'. Ignored when cursor is set.

cursor
string | nullquery

Pagination cursor from a previous response's next_cursor; carries the window and order

limit
integerquery

Maximum number of logs to return

Responses

Successful Response

next_cursor
string | null
results
array<DeploymentLogRecord>* required
DeploymentLogRecord
body
string* required
log_attributes
map<string>* required
severity_text
string* required
span_id
string* required
timestamp
date-time* required
trace_id
string* required

GET /v1/workflows/deployments/{name}/logs/stream

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.

Parameters

name
stringpath* required
worker_name
string | nullquery

Filter logs by worker name

workflow_name
string | nullquery

Filter logs by workflow name

after
date-time | nullquery

Start a fresh stream at this timestamp (ignored when resuming via last_event_id)

last_event_id
string | nullquery

Resume from this cursor (a prior response's SSE id)

Last-Event-ID
string | nullheader

Resume from this cursor (a prior response's SSE id). Takes precedence over the query parameter.

Server-Side Events

event-stream<ResponseBody>

Stream of Server-Sent Events (SSE): log events carry a DeploymentLogRecord; error events carry a StreamError payload.

ResponseBody

Stream of Server-Sent Events (SSE): log events carry a DeploymentLogRecord; error events carry a StreamError payload.

DeploymentLogRecord
body
string* required
log_attributes
map<string>* required
severity_text
string* required
span_id
string* required
timestamp
date-time* required
trace_id
string* required
StreamError
error
string* required
reason
string* required
event
"log" | "error"
id
string