Skip to content

Function: searchWorkflows() ​

ts
function searchWorkflows(
   client, 
   parameters?, 
   options?
): Promise<{
[key: string]: unknown;
  isLast?: boolean;
  maxResults?: number;
  nextPage?: string;
  self?: string;
  startAt?: number;
  statuses?: object[];
  total?: number;
  values?: object[];
}>;

Defined in: src/cloud/api/workflows.ts:984

Returns a paginated list of global and project workflows. If workflow names are specified in the query string, details of those workflows are returned. Otherwise, all workflows are returned.

Permissions required:

  • Administer Jira global permission to access all, including project-scoped, workflows
  • At least one of the Administer projects and View (read-only) workflow project permissions to access project-scoped workflows

Parameters ​

ParameterTypeDescription
clientClient-
parameters?{ expand?: | string & object | "values.transitions" | (string & object | "values.transitions")[]; isActive?: boolean; maxResults?: number; orderBy?: | "name" | string & object | "created" | "updated" | "-created" | "+created" | "-name" | "+name" | "-updated" | "+updated"; projectId?: number; queryString?: string; scope?: string; startAt?: number; }-
parameters.expand?| string & object | "values.transitions" | (string & object | "values.transitions")[]Use expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: - values.transitions Returns the transitions that each workflow is associated with.
parameters.isActive?booleanFilters active and inactive workflows.
parameters.maxResults?numberThe maximum number of items to return per page.
parameters.orderBy?| "name" | string & object | "created" | "updated" | "-created" | "+created" | "-name" | "+name" | "-updated" | "+updated"Order the results by a field: - name Sorts by workflow name. - created Sorts by create time. - updated Sorts by update time.
parameters.projectId?numberThe ID of the project to filter the workflows by. Only workflows associated with the given project are returned.
parameters.queryString?stringString used to perform a case-insensitive partial match with workflow name.
parameters.scope?stringThe scope of the workflow. Global for company-managed projects and Project for team-managed projects.
parameters.startAt?numberThe index of the first item to return in a page of results (page offset).
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; isLast?: boolean; maxResults?: number; nextPage?: string; self?: string; startAt?: number; statuses?: object[]; total?: number; values?: object[]; }>