getWorkflowsPaginated method

Future<PageBeanWorkflow> getWorkflowsPaginated({
  1. int? startAt,
  2. int? maxResults,
  3. List<String>? workflowName,
  4. String? expand,
  5. String? queryString,
  6. String? orderBy,
  7. bool? isActive,
})

Returns a paginated list of published classic workflows. When workflow names are specified, details of those workflows are returned. Otherwise, all published classic workflows are returned.

This operation does not return next-gen workflows.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanWorkflow> getWorkflowsPaginated(
    {int? startAt,
    int? maxResults,
    List<String>? workflowName,
    String? expand,
    String? queryString,
    String? orderBy,
    bool? isActive}) async {
  return PageBeanWorkflow.fromJson(await _client.send(
    'get',
    'rest/api/3/workflow/search',
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (workflowName != null)
        'workflowName': workflowName.map((e) => e).join(','),
      if (expand != null) 'expand': expand,
      if (queryString != null) 'queryString': queryString,
      if (orderBy != null) 'orderBy': orderBy,
      if (isActive != null) 'isActive': '$isActive',
    },
  ));
}