Function: getGroups()
ts
function getGroups(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
data?: object[];
links?: {
[key: string]: unknown;
next?: string | null;
prev?: string | null;
self?: string | null;
};
}>;Defined in: src/admin/api/groups.ts:282
This API is deprecated and will no longer work after June 30, 2027. Use the Search for groups in an organization endpoint instead.
Returns a page of groups in an organization that match the supplied parameters.
Scopes
Authorization scopes required: read:groups:admin
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { accountIds?: string[]; counts?: { includeResources?: boolean; includeUsers?: boolean; }; cursor?: string; directoryId: string; directoryIds?: string[]; groupIds?: string[]; limit?: number; orgId: string; resourceIds?: string[]; resourceOwners?: string[]; roleIds?: ( | string & object | "atlassian/org-admin" | "atlassian/site-admin" | "atlassian/user-access-admin" | "atlassian/ai-access" | "atlassian/user" | "atlassian/admin" | "atlassian/guest" | "atlassian/customer" | "atlassian/contributor" | "atlassian/basic" | "atlassian/stakeholder")[]; searchTerm?: string; sortBy?: object[]; } | - |
parameters.accountIds? | string[] | A list of user account IDs. |
parameters.counts? | { includeResources?: boolean; includeUsers?: boolean; } | Whether to include counts of different objects associated with the group. |
parameters.counts.includeResources? | boolean | Whether to include the number of resources associated with the group. |
parameters.counts.includeUsers? | boolean | Whether to include the number of users associated with the group. |
parameters.cursor? | string | Sets the cursor position to retrieve the next set of results. If present, all other parameters are discarded when searching. |
parameters.directoryId? | string | Unique ID associated with a directory. The - character can be used to increase the operation scope to all directories the requestor has permission to manage. |
parameters.directoryIds? | string[] | A list of directory IDs. The requestor must have permissions to administer resources linked to these directories. |
parameters.groupIds? | string[] | A list of group IDs. |
parameters.limit? | number | The desired number of results for the search request. |
parameters.orgId? | string | Your organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key. |
parameters.resourceIds? | string[] | A list of resource IDs. The resource IDs should be specified using the Atlassian Resource Identifier (ARI) format. Example ARI: ari:cloud:jira-core::site/1 |
parameters.resourceOwners? | string[] | The list of resource owners to filter the results by. Used to identify resources using their owner to which the user has at least one role assigned to. |
parameters.roleIds? | ( | string & object | "atlassian/org-admin" | "atlassian/site-admin" | "atlassian/user-access-admin" | "atlassian/ai-access" | "atlassian/user" | "atlassian/admin" | "atlassian/guest" | "atlassian/customer" | "atlassian/contributor" | "atlassian/basic" | "atlassian/stakeholder")[] | A list of role IDs. The Atlassian canonical roles are used to determine the permissions of the user against resources within the organization. The allowed roles are: - atlassian/user - Can access the product, with no product admin permissions - atlassian/admin - Can access the product, with product admin permissions - atlassian/guest - Can only access one space you or space admins specify - atlassian/customer - (Jira Service Management) Can visit help center, submit help requests, and view articles (non-billable) - atlassian/user-access-admin - No product access. Can administer users and groups for this product in Atlassian Administration - atlassian/contributor - Can access the product to view, comment, and vote only (non-billable) - atlassian/basic - Can access basic product features, with no product admin permissions (non-billable) - atlassian/stakeholder - Can receive incident updates and has the same product access as Customer. Non-billable but available only on Premium and Enterprise plans - atlassian/org-admin - An organization admin is the highest level of admin and can complete any administrative task in Atlassian Administration - atlassian/site-admin - Site admins can access Atlassian Administration and complete tasks related to the specific site they are administering. - atlassian/ai-access - Can use AI features in AI-enabled apps they have access to. |
parameters.searchTerm? | string | A search term to search the name field. |
parameters.sortBy? | object[] | The field and direction to sort the results by. Currently, only a single field can be sorted by. If null, the default sorting will be used. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; data?: object[]; links?: { [key: string]: unknown; next?: string | null; prev?: string | null; self?: string | null; }; }>
Deprecated
This API is deprecated and will no longer work after June 30, 2027. Use the Search for groups in an organization endpoint instead.