PUT /api/fleet/fleet_server_hosts/{itemId}

Spaces method and path for this operation:

put /s/{space_id}/api/fleet/fleet_server_hosts/{itemId}

Refer to Spaces for more information.

Update a Fleet Server host by ID.

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

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • itemId string Required

    The ID of the Fleet Server host

application/json

Body

  • host_urls array[string]

    At least 1 but not more than 10 elements.

  • is_default boolean
  • is_internal boolean
  • name string
  • proxy_id string | null Required
  • secrets object

    Additional properties are NOT allowed.

    Hide secrets attribute Show secrets attribute object
  • ssl object | null

    Additional properties are NOT allowed.

    Hide ssl attributes Show ssl attributes object | null
    • agent_certificate string
    • agent_certificate_authorities array[string]

      Not more than 10 elements.

    • agent_key string
    • certificate string
    • certificate_authorities array[string]

      Not more than 10 elements.

    • client_auth string

      Values are optional, required, or none.

    • es_certificate string
    • es_certificate_authorities array[string]

      Not more than 10 elements.

    • es_key string
    • key string

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • item object Required

      Additional properties are NOT allowed.

      Hide item attributes Show item attributes object
      • host_urls array[string] Required

        At least 1 but not more than 10 elements.

      • id string Required
      • is_default boolean

        Default value is false.

      • is_internal boolean
      • is_preconfigured boolean

        Default value is false.

      • name string Required
      • proxy_id string | null
      • secrets object

        Additional properties are NOT allowed.

        Hide secrets attribute Show secrets attribute object
      • ssl object | null

        Additional properties are NOT allowed.

        Hide ssl attributes Show ssl attributes object | null
        • agent_certificate string
        • agent_certificate_authorities array[string]

          Not more than 10 elements.

        • agent_key string
        • certificate string
        • certificate_authorities array[string]

          Not more than 10 elements.

        • client_auth string

          Values are optional, required, or none.

        • es_certificate string
        • es_certificate_authorities array[string]

          Not more than 10 elements.

        • es_key string
        • key string
  • 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/fleet_server_hosts/{itemId}
curl \
 --request PUT 'https://localhost:5601/api/fleet/fleet_server_hosts/{itemId}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"host_urls":["https://updated-fleet-server.example.com:8220"],"is_default":false,"name":"Updated Fleet Server"}'
Request example
Update a Fleet Server host
{
  "host_urls": [
    "https://updated-fleet-server.example.com:8220"
  ],
  "is_default": false,
  "name": "Updated Fleet Server"
}
Response examples (200)
The updated Fleet Server host
{
  "item": {
    "host_urls": [
      "https://updated-fleet-server.example.com:8220"
    ],
    "id": "fleet-server-host-id-1",
    "is_default": false,
    "is_preconfigured": false,
    "name": "Updated Fleet Server"
  }
}
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 Fleet Server host was found with the given ID
{
  "error": "Not Found",
  "message": "Fleet server fleet-server-host-id-1 not found",
  "statusCode": 404
}