Get a password

Retrieves a specific password by ID. The password value is not returned.

get

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

application/json

A password

KongPassword

A password credential associated with a basic auth entry. The password value is not returned after creation.

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}/basic-auths/{basicAuthId}/passwords/{passwordId}
 
application/json

Update a password

Partially updates a password’s expiration date.

patch

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)

Body

application/json

Password to be partially updated

UpdatePasswordBody

Request body for partially updating a password

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 password

KongPassword

A password credential associated with a basic auth entry. The password value is not returned after creation.

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}/basic-auths/{basicAuthId}/passwords/{passwordId}

Body

{}
 
application/json

Replace a password

Fully replaces an existing password with the provided values.

put

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)

Body

application/json

Password to be replaced

ReplacePasswordBody

Request body for replacing a password

secretstringrequired

>= 1 characters<= 255 characters

expires_atstring | null(date-time)required

An ISO-8601 timestamp representation of entity expiration date.

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

Response

application/json

A password

KongPassword

A password credential associated with a basic auth entry. The password value is not returned after creation.

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

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

Body

{ "secret": "secret", "expires_at": "2022-11-04T20:10:06.927Z" }
 
application/json

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