WARNING The standard Atlassian group names are default names only and can be edited or deleted. For example, an admin or Atlassian support could delete the default group jira-software-users or rename it to jsw-users at any point.

Hierarchy

  • CommonHttpService
    • GroupService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns GroupService

Methods

  • Returns the users that are members of a group.

    Use updated Get group API

    Permissions required: Permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          expand?: ("operations" | "isExternalCollaborator" | "personalSpace")[];
          groupId: string;
          limit?: number;
          shouldReturnTotalSize?: boolean;
          start?: number;
      }
      • Optionalexpand?: ("operations" | "isExternalCollaborator" | "personalSpace")[]

        A multi-value parameter indicating which properties of the user to expand.

        • operations returns the operations that the user is allowed to do.
        • personalSpace returns the user's personal space, if it exists.
        • isExternalCollaborator(@deprecated) see isGuest in response to find out whether the user is a guest.
      • groupId: string

        The id of the group to be queried for its members.

      • Optionallimit?: number

        The maximum number of users to return per page. Note, this may be restricted by fixed system limits.

      • OptionalshouldReturnTotalSize?: boolean

        Whether to include total size parameter in the results. Note, fetching total size property is an expensive operation; use it if your use case needs this value.

      • Optionalstart?: number

        The starting index of the returned users.

    Returns Promise<UserArray>

    Returned if the requested users are returned.

    GET /wiki/rest/api/group/{groupId}/membersByGroupId @scopes-current read:confluence-groups @scopes-beta read:group:confluence, read:user:confluence

  • Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name.

    Permissions required: Permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accessType?: "user" | "admin" | "site-admin";
          limit?: number;
          start?: number;
      } = {}
      • OptionalaccessType?: "user" | "admin" | "site-admin"

        The group permission level for which to filter results.

      • Optionallimit?: number

        The maximum number of groups to return per page. Note, this may be restricted by fixed system limits.

      • Optionalstart?: number

        The starting index of the returned groups.

    Returns Promise<GroupArrayWithLinks>

    Returned if the requested groups are returned.

    GET /wiki/rest/api/group @scopes-current read:confluence-groups @scopes-beta read:group:confluence

  • Remove user as a member from a group.

    Permissions required: User must be a site admin.

    Parameters

    • params: {
          accountId: string;
          groupId: string;
          key?: string;
          username?: string;
      }
      • accountId: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • groupId: string

        Id of the group whose membership is updated.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<void>

    DELETE /wiki/rest/api/group/userByGroupId @scopes-current write:confluence-groups @scopes-beta write:group:confluence

  • Get search results of groups by partial query provided.

    Parameters

    • params: {
          limit?: number;
          query: string;
          shouldReturnTotalSize?: boolean;
          start?: number;
      }
      • Optionallimit?: number

        The maximum number of groups to return per page. Note, this is restricted to a maximum limit of 200 groups.

      • query: string

        the search term used to query results.

      • OptionalshouldReturnTotalSize?: boolean

        Whether to include total size parameter in the results. Note, fetching total size property is an expensive operation; use it if your use case needs this value.

      • Optionalstart?: number

        The starting index of the returned groups.

    Returns Promise<GroupArrayWithLinks>

    Returns a full JSON representation of group collection.

    GET /wiki/rest/api/group/picker @scopes-current read:confluence-groups @scopes-beta read:group:confluence

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void