list method

Future<ListWorkflowsResponse> list(
  1. String parent, {
  2. String? filter,
  3. String? orderBy,
  4. int? pageSize,
  5. String? pageToken,
  6. String? $fields,
})

Lists workflows in a given project and location.

The default order is not specified.

Request parameters:

parent - Required. Project and location from which the workflows should be listed. Format: projects/{project}/locations/{location} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

filter - Filter to restrict results to specific workflows. For details, see AIP-160. For example, if you are using the Google APIs Explorer: state="SUCCEEDED" or createTime>"2023-08-01" AND state="FAILED"

orderBy - Comma-separated list of fields that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a "desc" suffix. If not specified, the results are returned in an unspecified order.

pageSize - Maximum number of workflows to return per call. The service might return fewer than this value even if not at the end of the collection. If a value is not specified, a default value of 500 is used. The maximum permitted value is 1000 and values greater than 1000 are coerced down to 1000.

pageToken - A page token, received from a previous ListWorkflows call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWorkflows must match the call that provided the page token.

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListWorkflowsResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListWorkflowsResponse> list(
  core.String parent, {
  core.String? filter,
  core.String? orderBy,
  core.int? pageSize,
  core.String? pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (filter != null) 'filter': [filter],
    if (orderBy != null) 'orderBy': [orderBy],
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/workflows';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListWorkflowsResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}