jira.js
    Preparing search index...

    Function searchDirectoryGroups

    • Return a page of groups in an organization that match the supplied parameters.

      Use searchTerm for free-text search across group names. Filter by IDs, role assignments, resources, members, or specific group identifiers using the corresponding request fields. Use the expand field to include additional fields such as counts.resources and counts.users in the response.

      Parameters

      • client: Client
      • parameters: {
            accountIds?: string[];
            cursor?: string;
            directoryId: string;
            directoryIds?: string[];
            expand?: (string & {} | "counts.resources" | "counts.users")[];
            groupIds?: string[];
            groupNames?: string[];
            limit?: number;
            orgId: string;
            resourceIds?: string[];
            resourceOwners?: string[];
            roleIds?: string[];
            searchTerm?: string;
            sortBy?: {
                direction: "desc" | string & {} | "asc";
                field: "name" | string & {};
                [key: string]: unknown;
            }[];
        }
        • OptionalaccountIds?: string[]

          Filter by account IDs of group members.

        • Optionalcursor?: string

          Sets the starting point for the page of results to return.

        • 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.

        • OptionaldirectoryIds?: string[]

          Filter by directory IDs.

        • Optionalexpand?: (string & {} | "counts.resources" | "counts.users")[]

          List of additional fields to include in the response. Available values:

          • counts.resources — the number of resources the group has access to.
          • counts.users — the number of users in the group.
        • OptionalgroupIds?: string[]

          Filter by group IDs.

          Mutually exclusive with groupNames — providing both returns a 400 Bad Request error.

        • OptionalgroupNames?: string[]

          List of full group names to filter by (case-insensitive). Only exact matches are returned.

          Mutually exclusive with searchTerm and groupIds — providing either combination returns a 400 Bad Request error.

        • Optionallimit?: number

          The number of results to return per page. Defaults to 20.

        • orgId: string

          Your organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key.

        • OptionalresourceIds?: string[]

          Filter by resource IDs.

        • OptionalresourceOwners?: string[]

          Filter by resource type keys.

        • OptionalroleIds?: string[]

          Filter by canonical Atlassian role IDs.

        • OptionalsearchTerm?: string

          Free-text search term. Matched against the group name.

          Mutually exclusive with groupNames — providing both returns a 400 Bad Request error.

        • OptionalsortBy?: {
              direction: "desc" | string & {} | "asc";
              field: "name" | string & {};
              [key: string]: unknown;
          }[]

          List of sort fields. Currently only a single sort field is supported.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              data: {
                  counts?: {
                      resources?: number;
                      users?: number;
                      [key: string]: unknown;
                  };
                  description?: string;
                  directoryId?: string;
                  externalSynced?: boolean;
                  id?: string;
                  links?: { self?: string
                  | null; [key: string]: unknown };
                  managedBy?: string;
                  managementAccess?: {
                      deletable?: boolean;
                      modifiable?: boolean;
                      readable?: boolean;
                      [key: string]: unknown;
                  };
                  name?: string;
                  [key: string]: unknown;
              }[];
              links?: {
                  next?: string
                  | null;
                  prev?: string | null;
                  self?: string | null;
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          },
      >