# Workflows ## Overview ### Available Operations * [getWorkflows](#getworkflows) - Get Workflows * [getWorkflowRegistrations](#getworkflowregistrations) - Get Workflow Registrations * [executeWorkflow](#executeworkflow) - Execute Workflow * [~~executeWorkflowRegistration~~](#executeworkflowregistration) - Execute Workflow Registration :warning: **Deprecated** * [getWorkflow](#getworkflow) - Get Workflow * [updateWorkflow](#updateworkflow) - Update Workflow * [getWorkflowRegistration](#getworkflowregistration) - Get Workflow Registration * [bulkArchiveWorkflows](#bulkarchiveworkflows) - Bulk Archive Workflows * [bulkUnarchiveWorkflows](#bulkunarchiveworkflows) - Bulk Unarchive Workflows * [archiveWorkflow](#archiveworkflow) - Archive Workflow * [unarchiveWorkflow](#unarchiveworkflow) - Unarchive Workflow ## getWorkflows Get Workflows ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.GetWorkflowsV1WorkflowsGetRequest](../../models/operations/getworkflowsv1workflowsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.GetWorkflowsV1WorkflowsGetResponse](../../models/operations/getworkflowsv1workflowsgetresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## getWorkflowRegistrations Get Workflow Registrations ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest](../../models/operations/getworkflowregistrationsv1workflowsregistrationsgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowRegistrationListResponse](../../models/components/workflowregistrationlistresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## executeWorkflow Execute Workflow ### Example Usage ```typescript 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: "", workflowExecutionRequest: {}, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript 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: "", workflowExecutionRequest: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("workflowsExecuteWorkflow failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest](../../models/operations/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost](../../models/operations/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## ~~executeWorkflowRegistration~~ Execute Workflow Registration > :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `request` | [operations.ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePostRequest](../../models/operations/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[operations.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdExecutePost](../../models/operations/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## getWorkflow Get Workflow ### Example Usage ```typescript 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: "", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript 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: "", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("workflowsGetWorkflow failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest](../../models/operations/getworkflowv1workflowsworkflowidentifiergetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowGetResponse](../../models/components/workflowgetresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## updateWorkflow Update Workflow ### Example Usage ```typescript 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: "", workflowUpdateRequest: {}, }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript 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: "", workflowUpdateRequest: {}, }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("workflowsUpdateWorkflow failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest](../../models/operations/updateworkflowv1workflowsworkflowidentifierputrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowUpdateResponse](../../models/components/workflowupdateresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## getWorkflowRegistration Get Workflow Registration ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `request` | [operations.GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest](../../models/operations/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowRegistrationGetResponse](../../models/components/workflowregistrationgetresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## bulkArchiveWorkflows Bulk Archive Workflows ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [components.WorkflowBulkArchiveRequest](../../models/components/workflowbulkarchiverequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowBulkArchiveResponse](../../models/components/workflowbulkarchiveresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## bulkUnarchiveWorkflows Bulk Unarchive Workflows ### Example Usage ```typescript 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(); ``` ### Standalone function The standalone function version of this method: ```typescript 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(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [components.WorkflowBulkUnarchiveRequest](../../models/components/workflowbulkunarchiverequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowBulkUnarchiveResponse](../../models/components/workflowbulkunarchiveresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## archiveWorkflow Archive Workflow ### Example Usage ```typescript 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: "", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript 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: "", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("workflowsArchiveWorkflow failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest](../../models/operations/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowArchiveResponse](../../models/components/workflowarchiveresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | ## unarchiveWorkflow Unarchive Workflow ### Example Usage ```typescript 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: "", }); console.log(result); } run(); ``` ### Standalone function The standalone function version of this method: ```typescript 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: "", }); if (res.ok) { const { value: result } = res; console.log(result); } else { console.log("workflowsUnarchiveWorkflow failed:", res.error); } } run(); ``` ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `request` | [operations.UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest](../../models/operations/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response **Promise\<[components.WorkflowUnarchiveResponse](../../models/components/workflowunarchiveresponse.md)\>** ### Errors | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* |