POST /api/fleet/logstash_api_keys

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.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • api_key string Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
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
}