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:
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.
query{
groupsPage(
pageSize: 10
pageNumber: 1
) {
page {
id, displayName, userCount
}
pageInfo {
number
totalNumberOfRows
total
}
}
}
{
"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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
search | string | Text on which to search the groups in the organization. | |||
pageSize | integer | 50 | The number of records to return per page. | ||
pageNumber | integer | 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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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 | |||||
AssetPermission | boolean | Long-Term | The permission is for assets. | ||
OrganizationManagementPermission | boolean | Long-Term | The permission is for organization management. | ||
OrganizationPermission | boolean | Long-Term | The permission is for the organization. | ||
SystemPermission | boolean | Long-Term | The permission is for the system. | ||
ViewPermission | boolean | Long-Term | The 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
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
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-Term | A list of groups. See Group . | |
pageInfo | PageType | yes | Long-Term | Information about the group page. See PageType . |