List
Retrieves list of Workflow executions.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListExecutionsRequest =
cloudApi.serverless.workflows_execution_service.ListExecutionsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ExecutionServiceClient);
const result = await client.list(
ListExecutionsRequest.fromPartial({
workflowId: "workflowId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
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 ListExecutionsRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ExecutionServiceStub)
response = service.List(
ListExecutionsRequest(
workflow_id="workflowId",
# page_size = 0,
# page_token = "pageToken",
# filter = "filter"
)
)
print(response)
ListExecutionsRequest
workflowId
: string
ID of the Workflow.
pageSize
: int64
The maximum number of results per page that should be returned. If the number of available
results is larger than pageSize
, the service returns a ListExecutionsResponse.next_page_token
that can be used to get the next page of results in subsequent list requests.
Default value: 100.
pageToken
: string
Page token. To get the next page of results, set pageToken
to the
ListExecutionsResponse.next_page_token returned by a previous list request.
filter
: string
A filter expression that filters resources listed in the response.
The expression must specify:
- The field name. Currently filtering can be applied to the following fields: status, started_at, finished_at.
- Operator:
=
,<
or>
. - The value. Must be sting and match the regular expression
[+:\.-a-z0-9]
. Examples of a filter:status=ERROR
,created_by=John.Doe
.
ListExecutionsResponse
executions
: ExecutionPreview
List of Workflow executions.
nextPageToken
: string
Token for getting the next page of the list. If the number of results is greater than
the specified ListExecutionsRequest.page_size, use next_page_token
as the value
for the ListExecutionsRequest.page_token parameter in the next list request.
Each subsequent page will have its own next_page_token
to continue paging through the results.
ExecutionPreview
id
: string
ID of the Workflow execution. Generated at creation time.
workflowId
: string
ID of the Workflow.
status
: Execution.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.