List Groups

groups_list(
  query = NULL,
  permission = NULL,
  include_members = NULL,
  limit = NULL,
  page_num = NULL,
  order = NULL,
  order_dir = NULL
)

Arguments

query

string optional. If specified, it will filter the groups returned. Infix matching is supported (e.g., "query=group" will return "group" and "group of people" and "my group" and "my group of people").

permission

string optional. A permissions string, one of "read", "write", or "manage". Lists only groups for which the current user has that permission.

include_members

boolean optional. Show members of the group.

limit

integer optional. Number of results to return. Defaults to 50. Maximum allowed is 1000.

page_num

integer optional. Page number of the results to return. Defaults to the first page, 1.

order

string optional. The field on which to order the result set. Defaults to name. Must be one of: name, created_at.

order_dir

string optional. Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.

Value

An array containing the following fields:

id

integer, The ID of this group.

name

string, This group's name.

createdAt

string, The date and time when this group was created.

slug

string, The slug for this group.

organizationId

integer, The ID of the organization this group belongs to.

organizationName

string, The name of the organization this group belongs to.

memberCount

integer, The total number of members in this group.

members

array, An array containing the following fields:

  • id integer, The ID of this user.

  • name string, This user's name.

  • username string, This user's username.

  • initials string, This user's initials.

  • online boolean, Whether this user is online.