Skip to content

Get API key details

GET
/api/v1/api-keys/{keyId}
curl --request GET \
--url https://localhost:8080/api/v1/api-keys/example \
--header 'Authorization: <Authorization>'

Get details of one of the authenticated user’s API keys

keyId
required
string

API Key ID

API key details

Media type application/json
object
allowedIps
Array<string>
createdAt
string
createdBy

Key lifecycle

string
description
string
expiresAt
string
id
string
keyId
string
lastUsedAt
string
name
string
organizationId
integer
projectId
integer
revocationReason
string
revokedAt
string
revokedBy
string
scopes

Permissions and scope

Array<string>
status

Status

string
usageCount
integer
userId

User context

string
Example generated
{
"allowedIps": [
"example"
],
"createdAt": "example",
"createdBy": "example",
"description": "example",
"expiresAt": "example",
"id": "example",
"keyId": "example",
"lastUsedAt": "example",
"name": "example",
"organizationId": 1,
"projectId": 1,
"revocationReason": "example",
"revokedAt": "example",
"revokedBy": "example",
"scopes": [
"example"
],
"status": "example",
"usageCount": 1,
"userId": "example"
}

Bad request - Key ID required

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized - Authentication required

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Forbidden - Can only view own API keys

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

API key not found

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}