Get Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .get_workflow_execution (execution_id = "<id>" )
# Handle response
print (res )
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.WorkflowExecutionResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
get_workflow_execution_history
Get Workflow Execution History
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .get_workflow_execution_history (execution_id = "<id>" , decode_payloads = True )
# Handle response
print (res )
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
decode_payloads
Optional[bool]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
Any
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
signal_workflow_execution
Signal Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .signal_workflow_execution (execution_id = "<id>" , name = "<value>" )
# Handle response
print (res )
models.SignalWorkflowResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Query Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .query_workflow_execution (execution_id = "<id>" , name = "<value>" )
# Handle response
print (res )
models.QueryWorkflowResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
terminate_workflow_execution
Terminate Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
mistral .workflows .executions .terminate_workflow_execution (execution_id = "<id>" )
# Use the SDK ...
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
batch_terminate_workflow_executions
Batch Terminate Workflow Executions
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .batch_terminate_workflow_executions (execution_ids = [
"<value 1>" ,
"<value 2>" ,
])
# Handle response
print (res )
Parameter
Type
Required
Description
execution_ids
List[str ]
✔️
List of execution IDs to process
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.BatchExecutionResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
cancel_workflow_execution
Cancel Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
mistral .workflows .executions .cancel_workflow_execution (execution_id = "<id>" )
# Use the SDK ...
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
batch_cancel_workflow_executions
Batch Cancel Workflow Executions
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .batch_cancel_workflow_executions (execution_ids = [])
# Handle response
print (res )
Parameter
Type
Required
Description
execution_ids
List[str ]
✔️
List of execution IDs to process
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.BatchExecutionResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Reset Workflow
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
mistral .workflows .executions .reset_workflow (execution_id = "<id>" , event_id = 24149 , exclude_signals = False , exclude_updates = False )
# Use the SDK ...
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
event_id
int
✔️
The event ID to reset the workflow execution to
reason
OptionalNullable[str]
➖
Reason for resetting the workflow execution
exclude_signals
Optional[bool]
➖
Whether to exclude signals that happened after the reset point
exclude_updates
Optional[bool]
➖
Whether to exclude updates that happened after the reset point
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
update_workflow_execution
Update Workflow Execution
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .update_workflow_execution (execution_id = "<id>" , name = "<value>" )
# Handle response
print (res )
models.UpdateWorkflowResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
get_workflow_execution_trace_otel
Get Workflow Execution Trace Otel
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .get_workflow_execution_trace_otel (execution_id = "<id>" )
# Handle response
print (res )
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.WorkflowExecutionTraceOTelResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
get_workflow_execution_trace_summary
Get Workflow Execution Trace Summary
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .get_workflow_execution_trace_summary (execution_id = "<id>" )
# Handle response
print (res )
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.WorkflowExecutionTraceSummaryResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
get_workflow_execution_trace_events
Get Workflow Execution Trace Events
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .get_workflow_execution_trace_events (execution_id = "<id>" , merge_same_id_events = False , include_internal_events = False )
# Handle response
print (res )
Parameter
Type
Required
Description
execution_id
str
✔️
N/A
merge_same_id_events
Optional[bool]
➖
N/A
include_internal_events
Optional[bool]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.WorkflowExecutionTraceEventsResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Stream
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .workflows .executions .stream (execution_id = "<id>" )
with res as event_stream :
for event in event_stream :
# handle event
print (event , flush = True )
Union[eventstreaming.EventStream[models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody], eventstreaming.EventStreamAsync[models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody]]
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*