Spaces method and path for this operation:
get /s/{space_id}/api/fleet/enrollment_api_keys/{keyId}
Refer to Spaces for more information.
Get an enrollment API key by ID.
[Required authorization] Route required privileges: fleet-agents-all OR fleet-setup.
GET
/api/fleet/enrollment_api_keys/{keyId}
curl \
--request GET 'https://<KIBANA_URL>/api/fleet/enrollment_api_keys/{keyId}' \
--header "Authorization: $API_KEY"
Response examples (200)
An enrollment API key
{
"item": {
"active": true,
"api_key": "api-key-value-1",
"api_key_id": "api-key-id-1",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "key-id-1",
"name": "Default policy enrollment key",
"policy_id": "policy-id-1"
}
}
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
Response examples (404)
No enrollment API key was found with the given ID
{
"error": "Not Found",
"message": "EnrollmentAPIKey key-id-1 not found",
"statusCode": 404
}