워크플로우 런 엔드포인트
워크플로우 런 엔드포인트 (Workflows Runs Endpoints)
Workflows API의 런(run) 관련 엔드포인트입니다. 워크플로우 실행 목록을 조회하고, 개별 실행의 상세 정보와 히스토리를 가져올 수 있어요.
출처: 문서
본문
Workflows API - runs. 워크플로우를 실행한 결과(런)를 확인하고 싶을 때 쓰는 엔드포인트 모음이에요.
GET /v1/workflows/runs — List Runs
실행 목록을 조회합니다.
응답 필드:
executions#*array<WorkflowExecutionWithoutResultResponse> — 워크플로우 실행 목록next_page_token#string|null — 다음 페이지를 가져올 때 쓰는 토큰. 마지막 페이지면 null
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.workflows.runs.listRuns({});
for await (const page of result) {
console.log(page);
}
}
run();
Python:
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.runs.list_runs(order="desc", include_internal=True, page_size=50)
while res is not None:
# Handle items
res = res.next()
curl:
curl https://api.mistral.ai/v1/workflows/runs \
-X GET \
-H 'Authorization: Bearer ***'
응답 (200):
{
"executions": [
{
"end_time": null,
"execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"root_execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"start_time": "2025-12-17T10:25:07.818693Z",
"status": "RUNNING",
"workflow_name": "support-workflow"
}
]
}
GET /v1/workflows/runs/{run_id} — Get Run
개별 실행의 상세 정보를 가져옵니다.
파라미터:
run_id#*string
응답 필드:
deployment_name#string|null — 이 실행을 돌린 배포 이름end_time#*date-time|null — 워크플로우 실행의 종료 시간 (있으면)execution_id#*string — 워크플로우 실행 IDparent_execution_id#string|null — 워크플로우 실행의 부모 실행 IDresult#*any|null — 워크플로우 실행 결과 (있으면)root_execution_id#*string — 워크플로우 실행의 루트 실행 IDrun_id#string|null — 고유 런 식별자 (데이터베이스 UUID)search_keys#map<string|null>|null —include_search_keys로 요청했다면 실행의 검색 키(메타데이터)start_time#*date-time — 워크플로우 실행의 시작 시간status#*"RUNNING"|"COMPLETED"|"FAILED"|"CANCELED"|"TERMINATED"|"CONTINUED_AS_NEW"|"TIMED_OUT"|"RETRYING_AFTER_ERROR" — 워크플로우 실행 상태total_duration_ms#integer|null — trace의 총 시간 (밀리초)user_id#string|null — 실행을 트리거한 사용자 IDworkflow_id#string|null — 워크플로우 IDworkflow_name#*string — 워크플로우 이름
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.workflows.runs.getRun({
runId: "553b071e-3d04-46aa-aa9a-0fca61dc60fa",
});
console.log(result);
}
run();
Python:
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.runs.get_run(run_id="553b071e-3d04-46aa-aa9a-0fca61dc60fa")
# Handle response
print(res)
curl:
curl https://api.mistral.ai/v1/workflows/runs/{run_id} \
-X GET \
-H 'Authorization: Bearer ***'
응답 (200):
{
"end_time": null,
"execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"result": null,
"root_execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"start_time": "2025-12-17T10:25:07.818693Z",
"status": "RUNNING",
"workflow_name": "support-workflow"
}
GET /v1/workflows/runs/{run_id}/history — Get Run History
런의 히스토리를 가져옵니다.
파라미터:
run_id#*stringdecode_payloads#boolean
응답 타입: any
TypeScript:
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: proces...EY"] ?? "",
});
async function run() {
const result = await mistral.workflows.runs.getRunHistory({
runId: "f7296489-0212-4239-9e35-12fabfe8cd11",
});
console.log(result);
}
run();
Python:
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11", decode_payloads=True)
# Handle response
print(res)
curl:
curl https://api.mistral.ai/v1/workflows/runs/{run_id}/history \
-X GET \
-H 'Authorization: Bearer ***'
응답 (200): null
더 알아보기 (Learn more)
- Workflows Runs Endpoints — 공식 문서
- Workflows Metrics Endpoints — 워크플로우 메트릭 조회
- Workflows API — 워크플로우 전체 엔드포인트