Keys

Get a Key using ID or name.

get/{workspace}/keys/{KeyIdOrName}

Request

  • Base URL
    http://localhost:8001
  • Auth
    API key in header Kong-Admin-Token

Path parameters

KeyIdOrName, string required

ID or name of the Key to lookup

workspace, string required
Example:team-payments

The name of the workspace

Response

Successfully fetched Key

Key required

A Key object holds a representation of asymmetric keys in various formats. When Kong or a Kong plugin requires a specific public or private key to perform certain operations, it can use this entity.

created_at, integer nullable

Unix epoch when the resource was created.

id, string nullable

A string representing a UUID (universally unique identifier).

jwk, string nullable

A JSON Web Key represented as a string.

kid, string required

A unique identifier for a key.

name, string nullable

The name to associate with the given keys.

pem, object nullable

A keypair in PEM format.

set, object nullable

The id (an UUID) of the key-set with which to associate the key.

tags, string[] nullable

An optional set of strings associated with the Key for grouping and filtering.

updated_at, integer nullable

Unix epoch when the resource was last updated.

x5t, string nullable

X.509 certificate SHA-1 thumbprint.

Example response

{
  "id": "d958f66b-8e99-44d2-b0b4-edd5bbf24658",
  "jwk": "{\"alg\":\"RSA\",  \"kid\": \"42\",  ...}",
  "kid": "42",
  "name": "a-key",
  "pem": {
    "private_key": "-----BEGIN",
    "public_key": "-----BEGIN"
  },
  "set": {
    "id": "b86b331c-dcd0-4b3e-97ce-47c5a9543031"
  }
}

Changes