Delete a password

Permanently deletes a password, immediately revoking its access.
This operation cannot be undone.

delete

Path Parameters

directoryIdstring(uuid)required

ID of the directory

principalIdstring(uuid)required

Unique identifier of the principal (UUID format)

basicAuthIdstring(uuid)required

Unique identifier of the basic auth credential (UUID format)

passwordIdstring(uuid)required

Unique identifier of the password (UUID format)

Response

Success

delete/directories/{directoryId}/principals/{principalId}/basic-auths/{basicAuthId}/passwords/{passwordId}
 

Create a principal API key

Creates a new API key for the specified principal.
Keys can be system-generated (v1) or imported with a custom secret, and may have an optional expiration date.

post

Path Parameters

directoryIdstring(uuid)required

ID of the directory

principalIdstring(uuid)required

Unique identifier of the principal (UUID format)

Body

application/json

Key to be created

CreatePrincipalKeyBody

CreatePrincipalKeyBodyobject
One Of
typestringrequired

Allowed values:imported

secretstringrequired

>= 1 characters<= 255 characters

expires_atstring | null(date-time)

An ISO-8601 timestamp representation of entity expiration date.

Example:2022-11-04T20:10:06.927Z

Response

application/json

A Kong Principal Key

KongPrincipalKeyWithSecret

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

expires_atstring | null(date-time)required

An ISO-8601 timestamp representation of entity expiration date.

Example:2022-11-04T20:10:06.927Z

secretstringrequired

The API key secret value. This is only returned when the key is first created
and cannot be retrieved again later.

post/directories/{directoryId}/principals/{principalId}/api-keys

Body

{}
 
application/json

List all API keys for a principal

Retrieves a paginated list of all API keys associated with the specified principal.
Results can be sorted by created_at, updated_at, or name.

get

Query Parameters

page[size]integer

The maximum number of items to include per page. The last page of a collection may include fewer items.

Example:10

page[before]string

Request the next page of data, starting with the item before this parameter.

Example:ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ

page[after]string

Request the next page of data, starting with the item after this parameter.

Example:ewogICJpZCI6ICJoZWxsbyB3b3JsZCIKfQ

sortstring

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’).

Example:created_at desc

Path Parameters

directoryIdstring(uuid)required

ID of the directory

principalIdstring(uuid)required

Unique identifier of the principal (UUID format)

Response

application/json

List Kong Principal Keys

ListKongPrincipalKeys

metaobjectrequired
Show Child Parameters
dataarray[object]required
Show Child Parameters
get/directories/{directoryId}/principals/{principalId}/api-keys
 
application/json

Update a principal API key

Partially updates an existing API key’s metadata.
Note: The key secret cannot be modified after creation.

patch

Path Parameters

directoryIdstring(uuid)required

ID of the directory

principalIdstring(uuid)required

Unique identifier of the principal (UUID format)

apiKeyIdstring(uuid)required

Unique identifier of the API key (UUID format)

Body

application/json

Key to be updated

UpdatePrincipalKeyBody

Request body for updating an API key’s metadata

expires_atstring | null(date-time)

An ISO-8601 timestamp representation of entity expiration date.

Example:2022-11-04T20:10:06.927Z

Response

application/json

A Kong Principal Key

KongPrincipalKey

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

expires_atstring | null(date-time)required

An ISO-8601 timestamp representation of entity expiration date.

Example:2022-11-04T20:10:06.927Z

patch/directories/{directoryId}/principals/{principalId}/api-keys/{apiKeyId}

Body

{}
 
application/json

Get a principal API key

Retrieves detailed information about a specific API key.
Note: The key secret is not returned; it is only available when the key is first created.

get

Path Parameters

directoryIdstring(uuid)required

ID of the directory

principalIdstring(uuid)required

Unique identifier of the principal (UUID format)

apiKeyIdstring(uuid)required

Unique identifier of the API key (UUID format)

Response

application/json

A Kong Principal Key

KongPrincipalKey

idstring(uuid)requiredread-only

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

expires_atstring | null(date-time)required

An ISO-8601 timestamp representation of entity expiration date.

Example:2022-11-04T20:10:06.927Z

get/directories/{directoryId}/principals/{principalId}/api-keys/{apiKeyId}
 
application/json