Liste des déploiements













Déploiements des workflows
API Workflows - déploiements.












Exemples
Exemples réels de code
Lister les Déploiements
GET /v1/workflows/deployments#
Lister les déploiements
200
Réponse réussie
Curseur pour la page suivante des résultats
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.listDeployments({});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.listDeployments({});
console.log(result);
}
run();
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)
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)
curl https://api.mistral.ai/v1/workflows/deployments \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/deployments \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"deployments": [
{
"created_at": "2025-12-17T10:25:07.818693Z",
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z"
}
],
"next_cursor": null,
"workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"deployments": [
{
"created_at": "2025-12-17T10:25:07.818693Z",
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z"
}
],
"next_cursor": null,
"workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Playground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "My resource",
"spec": {
"github_url": "consequat do"
}
}'curl https://api.mistral.ai/v1/workflows/deployments \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"name": "My resource",
"spec": {
"github_url": "consequat do"
}
}'202
nullnullObtenir un Déploiement
GET /v1/workflows/deployments/{name}#
Obtenir un déploiement
200
Réponse réussie
active_worker_count#
Default Value: 0
Nombre de workers actuellement actifs selon le seuil de disponibilité
Indique si au moins un worker est actuellement actif
is_hardened#
Default Value: false
Indique si le déploiement dispose d'au moins une autorisation valide
locations#
Types d'emplacement distincts signalés par les workers du déploiement
managed#
État du service géré en direct pour les déploiements gérés ; null pour les déploiements auto-hébergés ou lorsque les services gérés sont indisponibles
worker_count#
Default Value: 0
Nombre de workers enregistrés pour le déploiement
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.getDeployment({
name: "<value>",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.getDeployment({
name: "<value>",
});
console.log(result);
}
run();
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)
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)
curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"created_at": "2025-12-17T10:25:07.818693Z",
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z",
"workers": [
{
"created_at": "2025-12-17T10:25:07.818693Z",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z"
}
]
}{
"created_at": "2025-12-17T10:25:07.818693Z",
"id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z",
"workers": [
{
"created_at": "2025-12-17T10:25:07.818693Z",
"is_active": false,
"name": "My resource",
"updated_at": "2025-12-17T10:41:03.469341Z"
}
]
}Playground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'202
nullnullMettre à jour un déploiement
PATCH /v1/workflows/deployments/{name}#
Mettre à jour un déploiement
resources#
spec#
202
Playground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'curl https://api.mistral.ai/v1/workflows/deployments/{name} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{}'202
nullnullPlayground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments/{name}/stop \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/workflows/deployments/{name}/stop \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'202
nullnullPlayground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments/{name}/start \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/workflows/deployments/{name}/start \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'202
nullnullPlayground
Testez les endpoints en direct
curl https://api.mistral.ai/v1/workflows/deployments/{name}/restart \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/workflows/deployments/{name}/restart \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'202
nullnullObtenir les logs d'un déploiement
GET /v1/workflows/deployments/{name}/logs#
Récupérer les logs d'un déploiement (tous ses workers).
Utilisez after/before/order lors de la première requête pour définir la plage temporelle et l'ordre de tri ; pour les pages suivantes, transmettez le cursor de la réponse précédente (il mémorise la plage et l'ordre).
200
Requête réussie
next_cursor#
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.getDeploymentLogs({
name: "<value>",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.getDeploymentLogs({
name: "<value>",
});
console.log(result);
}
run();
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)
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)
curl https://api.mistral.ai/v1/workflows/deployments/{name}/logs \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/deployments/{name}/logs \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"results": [
{
"body": "ipsum eiusmod",
"log_attributes": [
"consequat do"
],
"severity_text": "reprehenderit ut dolore",
"span_id": "occaecat dolor sit",
"timestamp": "2025-12-17T10:25:07.818693Z",
"trace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
]
}{
"results": [
{
"body": "ipsum eiusmod",
"log_attributes": [
"consequat do"
],
"severity_text": "reprehenderit ut dolore",
"span_id": "occaecat dolor sit",
"timestamp": "2025-12-17T10:25:07.818693Z",
"trace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}
]
}Diffuser les logs d'un déploiement
GET /v1/workflows/deployments/{name}/logs/stream#
Diffuser les logs d'un déploiement (tous ses workers) via SSE.
Le curseur de reprise provient de l'en-tête Last-Event-ID ou du paramètre de requête last_event_id (l'en-tête est prioritaire) et prévaut sur after ; omettez tous les paramètres pour suivre depuis le début du déploiement.
200
Flux d'événements Server-Sent Events (SSE) : les événements log contiennent un DeploymentLogRecord ; les événements error contiennent une charge StreamError.
ResponseBody#
Playground
Testez les endpoints en direct
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.streamDeploymentLogs({
name: "<value>",
});
for await (const event of result) {
console.log(event);
}
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.deployments.streamDeploymentLogs({
name: "<value>",
});
for await (const event of result) {
console.log(event);
}
}
run();
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)
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)
curl https://api.mistral.ai/v1/workflows/deployments/{name}/logs/stream \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/deployments/{name}/logs/stream \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
nullnull