Spaces method and path for this operation:
post /s/{space_id}/api/fleet/logstash_api_keys
Refer to Spaces for more information.
Generate an API key for Logstash to use with a Fleet output.
[Required authorization] Route required privileges: fleet-settings-all.
POST
/api/fleet/logstash_api_keys
curl \
--request POST 'https://<KIBANA_URL>/api/fleet/logstash_api_keys' \
--header "Authorization: $API_KEY" \
--header "kbn-xsrf: true"
Response examples (200)
The generated Logstash API key
{
"api_key": "TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA"
}
Response examples (400)
Example of a generic error response
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}