Get API key metadata for all keys created by the user
Retrieves metadata for all API keys created by the given user.
Path parameters
-
user_id
string Required The user ID.
GET
/users/{user_id}/auth/keys
curl \
--request GET 'https://{{hostname}}/api/v1/users/{user_id}/auth/keys' \
--user "username:password"
Response examples (200)
{
"keys": [
{
"id": "string",
"user_id": "string",
"organization_id": "string",
"description": "string",
"key": "string",
"creation_date": "2025-05-04T09:42:00Z",
"expiration_date": "2025-05-04T09:42:00Z",
"role_assignments": {
"platform": [
{
"role_id": "string"
}
],
"organization": [
{
"role_id": "string",
"organization_id": "string"
}
],
"deployment": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"deployment_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"project": {
"elasticsearch": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"observability": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
],
"security": [
{
"role_id": "string",
"organization_id": "string",
"all": true,
"project_ids": [
"string"
],
"application_roles": [
"string"
]
}
]
}
}
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: api_keys.user_not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}