KongPrincipal

List the groups of a principal

Changed on

Retrieves a paginated list of every group the principal belongs to, of any type, including memberships inherited through nested teams. Results are ordered by when the membership was created, oldest first.

get/v2/directories/{directoryId}/principals/{principalId}/groups

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

directoryId, string uuid required

ID of the directory

principalId, string uuid required

Unique identifier of the principal (UUID format)

Query parameters

page, CursorPageParameters
size, integer

The number of items included per page.

after, string

Cursor param specifying the page (i.e. the next page) of data returned.

before, string

Cursor param specifying the page (i.e. the previous page) of data returned.

Determines which page of the collection to retrieve.

{
  "size": 10,
  "after": "ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ",
  "before": "ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ"
}

Response

List of the groups of a principal

ListKongPrincipalGroups required

A paginated list of the groups a principal belongs to.

meta, CursorMeta required

Pagination metadata.

data, KongPrincipalGroup[] required

Example response

{
  "meta": {
    "page": {
      "size": 10
    }
  },
  "data": [
    {
      "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
      "name": "Engineering",
      "direct": true,
      "team_manager": {
        "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
        "display_name": "josh",
        "email": "josh@acme.com"
      },
      "membership_id": "7e1c2a3b-4d5e-4f60-8a7b-9c0d1e2f3a4b"
    }
  ]
}

Changes