PUT /api/fleet/outputs/{outputId}

Spaces method and path for this operation:

put /s/{space_id}/api/fleet/outputs/{outputId}

Refer to Spaces for more information.

Update output by ID.

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

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • outputId string Required

    The ID of the output

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
  • 404 application/json

    Not Found

PUT /api/fleet/outputs/{outputId}
curl \
 --request PUT 'https://localhost:5601/api/fleet/outputs/{outputId}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"hosts":["https://updated-elasticsearch.example.com:9200"],"name":"Updated output"}'
Request example
Update a Fleet output
{
  "hosts": [
    "https://updated-elasticsearch.example.com:9200"
  ],
  "name": "Updated output"
}
Response examples (200)
The updated Fleet output
{
  "item": {
    "hosts": [
      "https://updated-elasticsearch.example.com:9200"
    ],
    "id": "output-id-1",
    "is_default": true,
    "is_default_monitoring": true,
    "name": "Updated 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
}
Response examples (404)
No output was found with the given ID
{
  "error": "Not Found",
  "message": "Output output-id-1 not found",
  "statusCode": 404
}