POST /api/fleet/outputs

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/outputs

Refer to Spaces for more information.

Create a new Fleet output.

[Required authorization] Route required privileges: fleet-settings-all.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json

Body object

Any of:

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • item object Required

      Any of:
  • 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/outputs
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/outputs' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"hosts":["https://elasticsearch.example.com:9200"],"is_default":false,"is_default_monitoring":false,"name":"My output","type":"elasticsearch"}'
Request example
Create a new Elasticsearch output
{
  "hosts": [
    "https://elasticsearch.example.com:9200"
  ],
  "is_default": false,
  "is_default_monitoring": false,
  "name": "My output",
  "type": "elasticsearch"
}
Response examples (200)
The created Fleet output
{
  "item": {
    "hosts": [
      "https://elasticsearch.example.com:9200"
    ],
    "id": "output-id-2",
    "is_default": false,
    "is_default_monitoring": false,
    "name": "My output",
    "type": "elasticsearch"
  }
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}