Skip to content

Function: getProjectComponentsPaginated()

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

Defined in: src/cloud/api/projectComponents.ts:184

Returns a paginated list of all components in a project. See the Get project components resource if you want to get a full list of versions without pagination.

If your project uses Compass components, this API will return a list of Compass components that are linked to issues in that project.

This operation can be accessed anonymously.

Permissions required: Browse Projects project permission for the project.

Parameters

ParameterTypeDescription
clientClient-
parameters{ componentSource?: "auto" | "jira" | string & object | "compass"; maxResults?: number; orderBy?: | "name" | "description" | string & object | "lead" | "issueCount" | "-description" | "+description" | "-name" | "+name" | "-issueCount" | "+issueCount" | "-lead" | "+lead"; projectIdOrKey: string; query?: string; startAt?: number; }-
parameters.componentSource?"auto" | "jira" | string & object | "compass"The source of the components to return. Can be jira (default), compass or auto. When auto is specified, the API will return connected Compass components if the project is opted into Compass, otherwise it will return Jira components. Defaults to jira.
parameters.maxResults?numberThe maximum number of items to return per page.
parameters.orderBy?| "name" | "description" | string & object | "lead" | "issueCount" | "-description" | "+description" | "-name" | "+name" | "-issueCount" | "+issueCount" | "-lead" | "+lead"Order the results by a field: - description Sorts by the component description. - issueCount Sorts by the count of issues associated with the component. - lead Sorts by the user key of the component's project lead. - name Sorts by component name.
parameters.projectIdOrKeystringThe project ID or project key (case sensitive).
parameters.query?stringFilter the results using a literal string. Components with a matching name or description are returned (case insensitive).
parameters.startAt?numberThe index of the first item to return in a page of results (page offset).

Returns

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