Spaces method and path for this operation:
post /s/{space_id}/api/fleet/setup
Refer to Spaces for more information.
Initialize Fleet and create the necessary Elasticsearch resources for Fleet to operate. Safe to call multiple times (idempotent). Returns the initialization status and any non-fatal errors encountered during setup.
[Required authorization] Route required privileges: fleet-agents-read OR fleet-agent-policies-read OR fleet-settings-read OR fleet-setup.
POST
/api/fleet/setup
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/setup' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Response examples (200)
Fleet setup success example
Fleet initialized successfully with no non-fatal errors
{
"isInitialized": true,
"nonFatalErrors": []
}
Fleet initialized but encountered non-fatal errors during setup
{
"isInitialized": true,
"nonFatalErrors": [
{
"message": "Package fleet_server not found in registry",
"name": "PackageNotFoundError"
}
]
}
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
Response examples (500)
Example of an internal server error response
{
"error": "Internal Server Error",
"message": "An error message describing what went wrong",
"statusCode": 500
}