Skip to main content

Get

Retrieves specified Workflow execution.

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

const GetExecutionRequest =
cloudApi.serverless.workflows_execution_service.GetExecutionRequest;

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

const result = await client.get(
GetExecutionRequest.fromPartial({
executionId: "executionId",
})
);
console.log(result);
})();

GetExecutionRequest

executionId : string

ID of the Workflow execution.

GetExecutionResponse

execution : Execution

Workflow execution details.

Execution

Status
  • STATUS_UNSPECIFIED

  • QUEUED

    Workflow execution is being queued.

  • RUNNING

    Workflow execution is running.

  • PAUSED

    Workflow execution is being paused.

  • STOPPED

    Workflow execution is stopped.

  • FAILED

    Workflow execution is failed.

  • FINISHED

    Workflow execution is finished.

id : string

ID of the Workflow execution. Generated at creation time.

workflowId : string

ID of the Workflow.

input : ExecutionInput

Input data for the Workflow execution.

result : ExecutionResult

Result of the Workflow execution.

error : ExecutionError

Error details, in case Workflow execution failed.

status : Status

Status of the Workflow execution

startedAt : google.protobuf.Timestamp

Start timestamp for the Workflow execution.

duration : google.protobuf.Duration

Duration of the Workflow execution.

ExecutionInput

One of input

  • inputJson : string

    JSON input data for the Workflow execution.

ExecutionResult

One of result

  • resultJson : string

    JSON result of the Workflow execution.

ExecutionError

message : string

Error message of the Workflow execution.

errorCode : string

Error code of the Workflow execution.