---
title: "List all directories"
method: GET
path: "/v2/directories"
tags: ["Kong Identity Directories"]
---

# List all directories

`GET /v2/directories`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v2/directories`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Retrieves a paginated list of all available directories in the organization.
Results can be sorted by name, created_at, or updated_at.

## 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.
- `sort` string: The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').

## Response `200`

List of Directories

- ListKongDirectories
  - `meta` CursorMeta, required: Pagination metadata.
    - `page` CursorMetaPage, required
      - `first` string, path: URI to the first page
      - `last` string, path: URI to the last page
      - `next` string, path, nullable, required: URI to the next page
      - `previous` string, path, nullable, required: URI to the previous page
      - `size` number, required: Requested page size
  - `data` KongDirectory[], required
    - `id` string, uuid, required: Contains a unique identifier used for this resource.
    - `name` string, required: Human-readable name of the directory, used to identify the organizational boundary. A directory name is unique within the organization.
    - `description` string, required: Optional description providing additional context about the directory's purpose or usage.
    - `allowed_control_planes` string[], required: List of control plane IDs authorized to make authentication requests to this directory. Maximum of 32 control planes can be specified. Use allow_all_control_planes for unrestricted access.
    - `allow_all_control_planes` boolean, required: When set to true, all control planes within the organization can make authentication requests to this directory. This overrides the allowed_control_planes list. Defaults to false for security.
    - `ttl_secs` integer, required: The time in seconds that a principal will be cached in memory on a running Gateway if it is successfully authenticated from this directory. Maximum is 86400 seconds (24 hours).
    - `negative_ttl_secs` integer, required: If a running Gateway triggers a lookup for a principal that cannot be authenticated in this directory, a `negative_ttl_secs` is set. The Gateway will not try to look up the principal in Konnect for `negative_ttl_secs` seconds. A principal will be cached for `negative_ttl_secs` if it does not exist in the directory, or if the provided credentials are invalid. Maximum is 86400 seconds (24 hours).
    - `labels` Labels, required: Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `managed_by` ManagedBy, required: Stores information about what manages this entity, such as the tool or system responsible for its lifecycle (for example, `terraform`). Keys must be 1–63 characters long, start and end with an alphanumeric character, and may contain dashes (`-`), underscores (`_`), and dots (`.`). Values must be 1–127 characters long and must not be empty. Keys and values must not contain spaces or control characters.
    - `created_at` string, date-time, required: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity update date.
    - `vault_enabled` boolean: Set to enabled to enable the Token Vault for this directory. Defaults to disabled when omitted.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

## Changes

- **2026-11-12** `d8bd04cfbaf7`: 1 breaking, 1 info
  - the `data/items/managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - the `data/items/managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
- **2026-11-03** `72599e2b1b09`: 3 info
  - added the optional property `data/items/vault_enabled` to the response with the `200` status
  - added the required property `data/items/negative_ttl_secs` to the response with the `200` status
  - added the required property `data/items/ttl_secs` to the response with the `200` status
- **2026-11-02** `7e077577b247`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v2/directories/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
