- getWorkflowExecution - Get Workflow Execution
- getWorkflowExecutionHistory - Get Workflow Execution History
- signalWorkflowExecution - Signal Workflow Execution
- queryWorkflowExecution - Query Workflow Execution
- terminateWorkflowExecution - Terminate Workflow Execution
- batchTerminateWorkflowExecutions - Batch Terminate Workflow Executions
- cancelWorkflowExecution - Cancel Workflow Execution
- batchCancelWorkflowExecutions - Batch Cancel Workflow Executions
- resetWorkflow - Reset Workflow
- updateWorkflowExecution - Update Workflow Execution
- getWorkflowExecutionTraceInfo - Get Workflow Execution Trace Info
- getWorkflowExecutionTraceOtel - Get Workflow Execution Trace Otel
- getWorkflowExecutionTraceSummary - Get Workflow Execution Trace Summary
- getWorkflowExecutionTraceEvents - Get Workflow Execution Trace Events
- stream - Stream
- getWorkflowExecutionLogs - Get Workflow Execution Logs
- streamWorkflowExecutionLogs - Stream Workflow Execution Logs
Get Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecution({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecution(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionV1WorkflowsExecutionsExecutionIdGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.WorkflowExecutionResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Execution History
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionHistory({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionHistory } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionHistory.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionHistory(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionHistory failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIdHistoryGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<any>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Signal Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.signalWorkflowExecution({
executionId: "<id>",
signalInvocationBody: {
name: "<value>",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsSignalWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsSignalWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsSignalWorkflowExecution(mistral, {
executionId: "<id>",
signalInvocationBody: {
name: "<value>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsSignalWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIdSignalsPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.SignalWorkflowResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Query Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.queryWorkflowExecution({
executionId: "<id>",
queryInvocationBody: {
name: "<value>",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsQueryWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsQueryWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsQueryWorkflowExecution(mistral, {
executionId: "<id>",
queryInvocationBody: {
name: "<value>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsQueryWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIdQueriesPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.QueryWorkflowResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Terminate Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
await mistral.workflows.executions.terminateWorkflowExecution({
executionId: "<id>",
});
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsTerminateWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsTerminateWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsTerminateWorkflowExecution(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("workflowsExecutionsTerminateWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIdTerminatePostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Batch Terminate Workflow Executions
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.batchTerminateWorkflowExecutions({
executionIds: [
"<value 1>",
"<value 2>",
],
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsBatchTerminateWorkflowExecutions } from "@mistralai/mistralai/funcs/workflowsExecutionsBatchTerminateWorkflowExecutions.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsBatchTerminateWorkflowExecutions(mistral, {
executionIds: [
"<value 1>",
"<value 2>",
],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsBatchTerminateWorkflowExecutions failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.BatchExecutionBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.BatchExecutionResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Cancel Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
await mistral.workflows.executions.cancelWorkflowExecution({
executionId: "<id>",
});
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsCancelWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsCancelWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsCancelWorkflowExecution(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("workflowsExecutionsCancelWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIdCancelPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Batch Cancel Workflow Executions
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.batchCancelWorkflowExecutions({
executionIds: [],
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsBatchCancelWorkflowExecutions } from "@mistralai/mistralai/funcs/workflowsExecutionsBatchCancelWorkflowExecutions.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsBatchCancelWorkflowExecutions(mistral, {
executionIds: [],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsBatchCancelWorkflowExecutions failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.BatchExecutionBody | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.BatchExecutionResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Reset Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
await mistral.workflows.executions.resetWorkflow({
executionId: "<id>",
resetInvocationBody: {
eventId: 24149,
},
});
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsResetWorkflow } from "@mistralai/mistralai/funcs/workflowsExecutionsResetWorkflow.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsResetWorkflow(mistral, {
executionId: "<id>",
resetInvocationBody: {
eventId: 24149,
},
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("workflowsExecutionsResetWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ResetWorkflowV1WorkflowsExecutionsExecutionIdResetPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update Workflow Execution
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.updateWorkflowExecution({
executionId: "<id>",
updateInvocationBody: {
name: "<value>",
},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsUpdateWorkflowExecution } from "@mistralai/mistralai/funcs/workflowsExecutionsUpdateWorkflowExecution.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsUpdateWorkflowExecution(mistral, {
executionId: "<id>",
updateInvocationBody: {
name: "<value>",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsUpdateWorkflowExecution failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIdUpdatesPostRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.UpdateWorkflowResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Execution Trace Info
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionTraceInfo({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionTraceInfo } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionTraceInfo.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionTraceInfo(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionTraceInfo failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionTraceInfoRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ExecutionTraceInfoResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Execution Trace Otel
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionTraceOtel({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionTraceOtel } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionTraceOtel.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionTraceOtel(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionTraceOtel failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionTraceOtelRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.WorkflowExecutionTraceOTelResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Execution Trace Summary
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionTraceSummary({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionTraceSummary } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionTraceSummary.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionTraceSummary(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionTraceSummary failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionTraceSummaryRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.WorkflowExecutionTraceSummaryResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Execution Trace Events
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionTraceEvents({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionTraceEvents } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionTraceEvents.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionTraceEvents(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionTraceEvents failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionTraceEventsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.WorkflowExecutionTraceEventsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Stream
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.stream({
executionId: "<id>",
});
for await (const event of result) {
console.log(event);
}
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsStream } from "@mistralai/mistralai/funcs/workflowsExecutionsStream.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsStream(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
for await (const event of result) {
console.log(event);
}
} else {
console.log("workflowsExecutionsStream failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StreamV1WorkflowsExecutionsExecutionIdStreamGetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<EventStream<operations.StreamV1WorkflowsExecutionsExecutionIdStreamGetResponseBody>>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Retrieve logs for a workflow execution.
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).
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.getWorkflowExecutionLogs({
executionId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsGetWorkflowExecutionLogs } from "@mistralai/mistralai/funcs/workflowsExecutionsGetWorkflowExecutionLogs.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsGetWorkflowExecutionLogs(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecutionsGetWorkflowExecutionLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowExecutionLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ExecutionLogSearchResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Stream logs for a workflow execution 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 execution start.
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executions.streamWorkflowExecutionLogs({
executionId: "<id>",
});
for await (const event of result) {
console.log(event);
}
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecutionsStreamWorkflowExecutionLogs } from "@mistralai/mistralai/funcs/workflowsExecutionsStreamWorkflowExecutionLogs.js";
// Use `MistralCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const mistral = new MistralCore({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const res = await workflowsExecutionsStreamWorkflowExecutionLogs(mistral, {
executionId: "<id>",
});
if (res.ok) {
const { value: result } = res;
for await (const event of result) {
console.log(event);
}
} else {
console.log("workflowsExecutionsStreamWorkflowExecutionLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StreamWorkflowExecutionLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<EventStream<operations.StreamWorkflowExecutionLogsResponseBody>>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |