Get an API key
Returns one key's details, without its secret.
Requires the admin role on the workspace and the api_keys plan feature.
AuthorizationBearer <JWT>An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.
workspaceId*stringThe workspace's id.
apiKeyId*stringThe API key's id. Not the secret.
An API key.
application/json- response
id*stringUnique identifier of the key.
workspaceId*stringThe only workspace this key can reach.
name*stringDisplay name.
prefix*stringFirst characters of the key, enough to tell keys apart in a list.
createdBy*stringThe user this key acts as when it makes requests.
createdByUser*|Profile of the user who created the key.
allowedIps*array<string>|IP addresses and CIDR ranges the key may be used from, or null when it works from anywhere.
expiresAt*|When the key stops working, or null when it never does.
lastUsedAt*|When the key was last used, or null if never. Can lag by up to a minute.
createdAt*stringWhen the key was created.
date-timeupdatedAt*stringWhen the key was last changed.
date-timecurl -X GET 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/api-keys/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90'{ "id": "string", "workspaceId": "string", "name": "CI pipeline", "prefix": "ccsp_a1", "createdBy": "string", "createdByUser": { "id": "string", "email": "string", "firstName": "string", "lastName": "string", "picture": "string" }, "allowedIps": [ "string" ], "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}Create an API key POST
Creates a key for this workspace. The secret is in the key field of this response and is never shown again, so store it now.
Revoke an API key DELETE
Deletes the key. Requests using it are rejected from the next call onwards. There is no way to restore it, so issue a new key first if something depends on it.