Skip to main content

Start

Starts new Workflow execution.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const StartExecutionRequest =
cloudApi.serverless.workflows_execution_service.StartExecutionRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ExecutionServiceClient);

const result = await client.start(
StartExecutionRequest.fromPartial({
workflowId: "workflowId",
// input: {
// inputJson: "inputJson"
// }
})
);
console.log(result);
})();

StartExecutionRequest

workflowId : string

ID of the Workflow.

input : ExecutionInput

Input for the Workflow execution

ExecutionInput

One of input

  • inputJson : string

    JSON input data for the Workflow execution.

StartExecutionResponse

executionId : string

ID of the Workflow execution.