Retrieves all of the groups for a given enterprise. The user must have admin permissions to inspect enterprise's groups.
This operation is performed by calling function getGroups.
See the endpoint docs at API Reference.
await client.groups.getGroups();- queryParams
GetGroupsQueryParams- Query parameters of getGroups method
- headersInput
GetGroupsHeadersInput- Headers of getGroups method
- cancellationToken
undefined | CancellationToken- Token used for request cancellation.
This function returns a value of type Groups.
Returns a collection of group objects. If there are no groups, an empty collection will be returned.
Creates a new group of users in an enterprise. Only users with admin permissions can create new groups.
This operation is performed by calling function createGroup.
See the endpoint docs at API Reference.
await client.groups.createGroup({
name: groupName,
description: groupDescription,
} satisfies CreateGroupRequestBody);- requestBody
CreateGroupRequestBody- Request body of createGroup method
- optionalsInput
CreateGroupOptionalsInput
This function returns a value of type GroupFull.
Returns the new group object.
Retrieves information about a group. Only members of this group or users with admin-level permissions will be able to use this API.
This operation is performed by calling function getGroupById.
See the endpoint docs at API Reference.
await client.groups.getGroupById(group.id, {
queryParams: {
fields: ['id', 'name', 'description', 'group_type'],
} satisfies GetGroupByIdQueryParams,
} satisfies GetGroupByIdOptionalsInput);- groupId
string- The ID of the group. Example: "57645"
- optionalsInput
GetGroupByIdOptionalsInput
This function returns a value of type GroupFull.
Returns the group object.
Updates a specific group. Only admins of this group or users with admin-level permissions will be able to use this API.
This operation is performed by calling function updateGroupById.
See the endpoint docs at API Reference.
await client.groups.updateGroupById(group.id, {
requestBody: { name: updatedGroupName } satisfies UpdateGroupByIdRequestBody,
} satisfies UpdateGroupByIdOptionalsInput);- groupId
string- The ID of the group. Example: "57645"
- optionalsInput
UpdateGroupByIdOptionalsInput
This function returns a value of type GroupFull.
Returns the updated group object.
Permanently deletes a group. Only users with admin-level permissions will be able to use this API.
This operation is performed by calling function deleteGroupById.
See the endpoint docs at API Reference.
await client.groups.deleteGroupById(group.id);- groupId
string- The ID of the group. Example: "57645"
- optionalsInput
DeleteGroupByIdOptionalsInput
This function returns a value of type undefined.
A blank response is returned if the group was successfully deleted.