Skip to main content

List

Retrieves list of Workflows in specified folder.

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

const ListWorkflowsRequest =
cloudApi.serverless.workflows_workflow_service.ListWorkflowsRequest;

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

const result = await client.list(
ListWorkflowsRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken",
// filter: "filter"
})
);
console.log(result);
})();

ListWorkflowsRequest

folderId : string

ID of the folder to list Workflows in.

pageSize : int64

The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a ListWorkflowsResponse.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 ListWorkflowsResponse.next_page_token returned by a previous list request.

filter : string

A filter expression that filters functions listed in the response.

The expression must specify:

  1. The field name. Currently filtering can only be applied to following fields: name, created_at.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z]([-a-z0-9]{0,61}[a-z0-9])?. Example of a filter: name=my-workflow.

ListWorkflowsResponse

workflows : WorkflowPreview

List of Workflows.

nextPageToken : string

Token for getting the next page of the list. If the number of results is greater than the specified ListWorkflowsRequest.page_size, use next_page_token as the value for the ListWorkflowsRequest.page_token parameter in the next list request.

Each subsequent page will have its own next_page_token to continue paging through the results.

WorkflowPreview

id : string

ID of the Workflow. Generated at creation time.

folderId : string

ID of the folder that the Workflow belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp for the Workflow.

name : string

Name of the Workflow. The name is unique within the folder.

description : string

Description of the Workflow.

labels : string

Workflow labels as key:value pairs.

status : Workflow.Status

Status of the Workflow.

logOptions : LogOptions

Options for logging from the Workflow.

networkId : string

ID of the VPC network Workflow will be executed in, in order to access private resources.

serviceAccountId : string

ID of the Service Account which will be used for resources access in Workflow execution.

LogOptions

disabled : bool

Is logging from Workflow disabled.

One of destination

  • logGroupId : string

    ID of the logging group which should be used for Workflows logs.

  • folderId : string

    ID of the folder which default logging group should be used for Workflows.

minLevel : yandex.cloud.logging.v1.LogLevel.Level

Minimum logs level.

See LogLevel.Level for details.