v4

latestOpenAPI 3.1.1Apache 2.02026-07-31107278570.4 KB
Directory

List directory groups

Retrieves all groups from a specified directory. Use this endpoint to view group structures from your connected identity provider.

get/api/v1/organizations/{organization_id}/directories/{directory_id}/groups

Path parameters

organization_idstring required

Unique identifier of the organization

directory_idstring required

Unique identifier of the directory

Query parameters

page_sizeinteger

Number of groups to return per page. Maximum value is 30. If not specified, defaults to 10

page_tokenstring

Token for pagination. Use the value returned in the 'next_page_token' field of the previous response

updated_afterstring date-time

Filter groups updated after this timestamp. Use ISO 8601 format

include_detailboolean

If true, includes full group details. If false or not specified, returns basic information only

include_external_groupsboolean

If true, returns group and its details from external provider (default: false)

Response

Successfully retrieved the list of groups from the specified directory

next_page_tokenstring

Token to retrieve the next page of results. Use this token in the 'page_token' field of the next request

prev_page_tokenstring

Token to retrieve the previous page of results. Use this token in the 'page_token' field of the next request

total_sizeinteger

Total number of groups matching the request criteria, regardless of pagination

Example response

{
  "groups": [
    {
      "display_name": "Admins",
      "id": "dirgroup_121312434123312",
      "total_users": 10,
      "updated_at": "2024-10-01T00:00:00Z"
    }
  ]
}