API Stability Long-Term

The groupsPage() GraphQL query returns all of the defined groups in an organization. This field is not yet available.

For more information on user groups, see the Manage Groups documentation page.

Syntax

Below is the syntax for the groupsPage() query field:

graphql
groupsPage(
     search: string
     pageSize: integer!
     pageNumber: integer!
     typeFilter: [PermissionType!]
   ): GroupsPage!

In the syntax here you can see there are three possible inputs — two required, as indicated by the exclamation points. The return datatype is more complicated. It's easier to understand if you look closely at the example below. The given and returned data, though, are described in the sections that follow the example.

Show:
graphql
query{
  groupsPage(
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, displayName, userCount
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}
Example Responses
Show:
json
{
  "data": {
    "groupsPage": {
      "page": [
        {
          "id": "BHdJstvjgDUjXg10KrbjiybpSbOHIw1b",
          "displayName": "chiefs",
          "userCount": 3
        },
        {
          "id": "frkEfzhGfwirpfrtLJ6QSW6ZoLqy5ZDI",
          "displayName": "peons",
          "userCount": 1
        }
      ],
      "pageInfo": {
        "number": 1,
        "totalNumberOfRows": 2,
        "total": 2
      }
    }
  }
}

For the GroupPage (see Returned Datatypes below), you have to enter page with the fields you want returned. Those parameters come from the group datatype. As for pageInfo, all three of the parameters are required and returned.

Given Datatypes

The given parameters are described in the table below:

Table: Mix of input for groupsPage

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 6, 2024
searchstring   Text on which to search the groups in the organization.
pageSizeinteger 50 The number of records to return per page.
pageNumberinteger 0 Used to specify which page of results to return.

The given datatype permissionType is an enumerated list of choices. They're listed here:

Table: PermissionType

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 16, 2024
AssetPermissionboolean  Long-TermThe permission is for assets.
OrganizationManagementPermissionboolean  Long-TermThe permission is for organization management.
OrganizationPermissionboolean  Long-TermThe permission is for the organization.
SystemPermissionboolean  Long-TermThe permission is for the system.
ViewPermissionboolean  Long-TermThe permission is for a view.

Returned Datatypes

The datatype GroupPage has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: GroupPage

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 25, 2024
page[Group]yes Long-TermA list of groups. See Group.
pageInfoPageTypeyes Long-TermInformation about the group page. See PageType.