Get
Retrieves specified Workflow execution.
- TypeScript
- Python
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);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.serverless.workflows.v1.execution_service_pb2_grpc import ExecutionServiceStub
from yandex.cloud.serverless.workflows.v1.execution_service_pb2 import GetExecutionRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ExecutionServiceStub)
response = service.Get(GetExecutionRequest(execution_id="executionId"))
print(response)
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
: stringJSON input data for the Workflow execution.
ExecutionResult
One of result
resultJson
: stringJSON result of the Workflow execution.
ExecutionError
message
: string
Error message of the Workflow execution.
errorCode
: string
Error code of the Workflow execution.