Skip to content

Function: findComponentsForProjects() ​

ts
function findComponentsForProjects(
   client, 
   parameters?, 
   options?
): 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:28

Returns a paginated list of all components in a project, including global (Compass) components when applicable.

This operation can be accessed anonymously.

Permissions required: Browse Projects project permission for the project.

Parameters ​

ParameterTypeDescription
clientClient-
parameters?{ maxResults?: number; orderBy?: | "name" | "description" | string & object | "-description" | "+description" | "-name" | "+name"; projectIdsOrKeys?: string[]; query?: string; startAt?: number; }-
parameters.maxResults?numberThe maximum number of items to return per page.
parameters.orderBy?| "name" | "description" | string & object | "-description" | "+description" | "-name" | "+name"Order the results by a field: - description Sorts by the component description. - name Sorts by component name.
parameters.projectIdsOrKeys?string[]The project IDs and/or project keys (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).
options?RequestOptions-

Returns ​

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