- getWorkflows - Get Workflows
- getWorkflowRegistrations - Get Workflow Registrations
- executeWorkflow - Execute Workflow
executeWorkflowRegistration- Execute Workflow Registration⚠️ Deprecated- getWorkflow - Get Workflow
- updateWorkflow - Update Workflow
- getWorkflowRegistration - Get Workflow Registration
- bulkArchiveWorkflows - Bulk Archive Workflows
- bulkUnarchiveWorkflows - Bulk Unarchive Workflows
- archiveWorkflow - Archive Workflow
- unarchiveWorkflow - Unarchive Workflow
Get Workflows
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.getWorkflows({});
for await (const page of result) {
console.log(page);
}
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsGetWorkflows } from "@mistralai/mistralai/funcs/workflowsGetWorkflows.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 workflowsGetWorkflows(mistral, {});
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("workflowsGetWorkflows failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowsV1WorkflowsGetRequest | ✔️ | 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<operations.GetWorkflowsV1WorkflowsGetResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Registrations
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.getWorkflowRegistrations({});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsGetWorkflowRegistrations } from "@mistralai/mistralai/funcs/workflowsGetWorkflowRegistrations.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 workflowsGetWorkflowRegistrations(mistral, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsGetWorkflowRegistrations failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest | ✔️ | 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.WorkflowRegistrationListResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Execute Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executeWorkflow({
workflowIdentifier: "<value>",
workflowExecutionRequest: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecuteWorkflow } from "@mistralai/mistralai/funcs/workflowsExecuteWorkflow.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 workflowsExecuteWorkflow(mistral, {
workflowIdentifier: "<value>",
workflowExecutionRequest: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecuteWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest | ✔️ | 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<operations.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Execute Workflow Registration
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.executeWorkflowRegistration({
workflowRegistrationId: "de11d76a-e0fb-44dd-abd9-2e75fc275b94",
workflowExecutionRequest: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsExecuteWorkflowRegistration } from "@mistralai/mistralai/funcs/workflowsExecuteWorkflowRegistration.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 workflowsExecuteWorkflowRegistration(mistral, {
workflowRegistrationId: "de11d76a-e0fb-44dd-abd9-2e75fc275b94",
workflowExecutionRequest: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsExecuteWorkflowRegistration failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest | ✔️ | 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. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.getWorkflow({
workflowIdentifier: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsGetWorkflow } from "@mistralai/mistralai/funcs/workflowsGetWorkflow.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 workflowsGetWorkflow(mistral, {
workflowIdentifier: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsGetWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest | ✔️ | 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.WorkflowGetResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Update Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.updateWorkflow({
workflowIdentifier: "<value>",
workflowUpdateRequest: {},
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsUpdateWorkflow } from "@mistralai/mistralai/funcs/workflowsUpdateWorkflow.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 workflowsUpdateWorkflow(mistral, {
workflowIdentifier: "<value>",
workflowUpdateRequest: {},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsUpdateWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest | ✔️ | 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.WorkflowUpdateResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Get Workflow Registration
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.getWorkflowRegistration({
workflowRegistrationId: "c4d86c40-960f-4e9a-9d6f-ad8342d7aa83",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsGetWorkflowRegistration } from "@mistralai/mistralai/funcs/workflowsGetWorkflowRegistration.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 workflowsGetWorkflowRegistration(mistral, {
workflowRegistrationId: "c4d86c40-960f-4e9a-9d6f-ad8342d7aa83",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsGetWorkflowRegistration failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest | ✔️ | 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.WorkflowRegistrationGetResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Bulk Archive Workflows
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.bulkArchiveWorkflows({
workflowIds: [],
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsBulkArchiveWorkflows } from "@mistralai/mistralai/funcs/workflowsBulkArchiveWorkflows.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 workflowsBulkArchiveWorkflows(mistral, {
workflowIds: [],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsBulkArchiveWorkflows failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.WorkflowBulkArchiveRequest | ✔️ | 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.WorkflowBulkArchiveResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Bulk Unarchive Workflows
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.bulkUnarchiveWorkflows({
workflowIds: [],
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsBulkUnarchiveWorkflows } from "@mistralai/mistralai/funcs/workflowsBulkUnarchiveWorkflows.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 workflowsBulkUnarchiveWorkflows(mistral, {
workflowIds: [],
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsBulkUnarchiveWorkflows failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
components.WorkflowBulkUnarchiveRequest | ✔️ | 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.WorkflowBulkUnarchiveResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Archive Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.archiveWorkflow({
workflowIdentifier: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsArchiveWorkflow } from "@mistralai/mistralai/funcs/workflowsArchiveWorkflow.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 workflowsArchiveWorkflow(mistral, {
workflowIdentifier: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsArchiveWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest | ✔️ | 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.WorkflowArchiveResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
Unarchive Workflow
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: process.env["MISTRAL_API_KEY"] ?? "",
});
async function run() {
const result = await mistral.workflows.unarchiveWorkflow({
workflowIdentifier: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { MistralCore } from "@mistralai/mistralai/core.js";
import { workflowsUnarchiveWorkflow } from "@mistralai/mistralai/funcs/workflowsUnarchiveWorkflow.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 workflowsUnarchiveWorkflow(mistral, {
workflowIdentifier: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workflowsUnarchiveWorkflow failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest | ✔️ | 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.WorkflowUnarchiveResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | */* |