Kibana Fleet Server hosts API

Fleet Server hosts APIs enable you to manage Fleet Server hosts, including creating, updating, and deleting Fleet Server host configurations.

OpenAPI Specification

kibana-fleet-server-hosts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    name: Kibana Team
  description: 'The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.

    The API calls are stateless.

    Each request that you make happens in isolation from other calls and must include all of the necessary information for Kibana to fulfill the

    request.

    API requests return JSON output, which is a format that is machine-readable and works well for automation.


    To interact with Kibana APIs, use the following operations:


    - GET: Fetches the information.

    - PATCH: Applies partial modifications to the existing information.

    - POST: Adds new information.

    - PUT: Updates the existing information.

    - DELETE: Removes the information.


    You can prepend any Kibana API endpoint with `kbn:` and run the request in **Dev Tools → Console**.

    For example:


    ```

    GET kbn:/api/data_views

    ```


    For more information about the console, refer to [Run API requests](https://www.elastic.co/docs/explore-analyze/query-filter/tools/console).


    NOTE: Access to internal Kibana API endpoints will be restricted in Kibana version 9.0. Please move any integrations to publicly documented APIs.


    ## Documentation source and versions


    This documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.

    It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).


    This documentation contains work-in-progress information for future Elastic Stack releases.

    '
  title: Kibana APIs Actions Fleet Server hosts API
  version: ''
  x-doc-license:
    name: Attribution-NonCommercial-NoDerivatives 4.0 International
    url: https://creativecommons.org/licenses/by-nc-nd/4.0/
  x-feedbackLink:
    label: Feedback
    url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
servers:
- url: https://{kibana_url}
  variables:
    kibana_url:
      default: localhost:5601
security:
- apiKeyAuth: []
- basicAuth: []
tags:
- name: Fleet Server hosts
  description: 'Fleet Server hosts APIs enable you to manage Fleet Server hosts, including creating, updating, and deleting Fleet Server host configurations.

    '
  x-displayName: Fleet Server hosts
paths:
  /api/fleet/fleet_server_hosts:
    get:
      description: '**Spaces method and path for this operation:**


        <div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/fleet_server_hosts</span></div>


        Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.


        List all Fleet Server hosts.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all OR fleet-settings-read.'
      operationId: get-fleet-fleet-server-hosts
      parameters: []
      responses:
        '200':
          content:
            application/json:
              examples:
                getFleetServerHostsExample:
                  description: List of Fleet Server hosts
                  value:
                    items:
                    - host_urls:
                      - https://fleet-server.example.com:8220
                      id: fleet-server-host-id-1
                      is_default: true
                      is_preconfigured: false
                      name: Default Fleet Server
                    page: 1
                    perPage: 20
                    total: 1
              schema:
                additionalProperties: false
                type: object
                properties:
                  items:
                    items:
                      additionalProperties: false
                      type: object
                      properties:
                        host_urls:
                          items:
                            type: string
                          maxItems: 10
                          minItems: 1
                          type: array
                        id:
                          type: string
                        is_default:
                          default: false
                          type: boolean
                        is_internal:
                          type: boolean
                        is_preconfigured:
                          default: false
                          type: boolean
                        name:
                          type: string
                        proxy_id:
                          nullable: true
                          type: string
                        secrets:
                          additionalProperties: false
                          type: object
                          properties:
                            ssl:
                              additionalProperties: false
                              type: object
                              properties:
                                agent_key:
                                  anyOf:
                                  - additionalProperties: false
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                    - id
                                  - type: string
                                es_key:
                                  anyOf:
                                  - additionalProperties: false
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                    - id
                                  - type: string
                                key:
                                  anyOf:
                                  - additionalProperties: false
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                    required:
                                    - id
                                  - type: string
                        ssl:
                          additionalProperties: false
                          nullable: true
                          type: object
                          properties:
                            agent_certificate:
                              type: string
                            agent_certificate_authorities:
                              items:
                                type: string
                              maxItems: 10
                              type: array
                            agent_key:
                              type: string
                            certificate:
                              type: string
                            certificate_authorities:
                              items:
                                type: string
                              maxItems: 10
                              type: array
                            client_auth:
                              enum:
                              - optional
                              - required
                              - none
                              type: string
                            es_certificate:
                              type: string
                            es_certificate_authorities:
                              items:
                                type: string
                              maxItems: 10
                              type: array
                            es_key:
                              type: string
                            key:
                              type: string
                      required:
                      - name
                      - host_urls
                      - id
                    maxItems: 10000
                    type: array
                  page:
                    type: number
                  perPage:
                    type: number
                  total:
                    type: number
                required:
                - items
                - total
                - page
                - perPage
          description: Successful response
        '400':
          content:
            application/json:
              examples:
                genericErrorResponseExample:
                  description: Example of a generic error response
                  value:
                    error: Bad Request
                    message: An error message describing what went wrong
                    statusCode: 400
              schema:
                additionalProperties: false
                description: Generic Error
                type: object
                properties:
                  attributes:
                    nullable: true
                  error:
                    type: string
                  errorType:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: number
                required:
                - message
                - attributes
          description: Bad Request
      summary: Get Fleet Server hosts
      tags:
      - Fleet Server hosts
      x-metaTags:
      - content: Kibana
        name: product_name
    post:
      description: '**Spaces method and path for this operation:**


        <div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/fleet_server_hosts</span></div>


        Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.


        Create a new Fleet Server host.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.'
      operationId: post-fleet-fleet-server-hosts
      parameters:
      - description: A required header to protect against CSRF attacks
        in: header
        name: kbn-xsrf
        required: true
        schema:
          example: 'true'
          type: string
      requestBody:
        content:
          application/json:
            examples:
              postFleetServerHostRequestExample:
                description: Create a new Fleet Server host
                value:
                  host_urls:
                  - https://fleet-server.example.com:8220
                  is_default: false
                  name: My Fleet Server
            schema:
              additionalProperties: false
              type: object
              properties:
                host_urls:
                  items:
                    type: string
                  maxItems: 10
                  minItems: 1
                  type: array
                id:
                  type: string
                is_default:
                  default: false
                  type: boolean
                is_internal:
                  type: boolean
                is_preconfigured:
                  default: false
                  type: boolean
                name:
                  type: string
                proxy_id:
                  nullable: true
                  type: string
                secrets:
                  additionalProperties: false
                  type: object
                  properties:
                    ssl:
                      additionalProperties: false
                      type: object
                      properties:
                        agent_key:
                          anyOf:
                          - additionalProperties: false
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                            - id
                          - type: string
                        es_key:
                          anyOf:
                          - additionalProperties: false
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                            - id
                          - type: string
                        key:
                          anyOf:
                          - additionalProperties: false
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                            - id
                          - type: string
                ssl:
                  additionalProperties: false
                  nullable: true
                  type: object
                  properties:
                    agent_certificate:
                      type: string
                    agent_certificate_authorities:
                      items:
                        type: string
                      maxItems: 10
                      type: array
                    agent_key:
                      type: string
                    certificate:
                      type: string
                    certificate_authorities:
                      items:
                        type: string
                      maxItems: 10
                      type: array
                    client_auth:
                      enum:
                      - optional
                      - required
                      - none
                      type: string
                    es_certificate:
                      type: string
                    es_certificate_authorities:
                      items:
                        type: string
                      maxItems: 10
                      type: array
                    es_key:
                      type: string
                    key:
                      type: string
              required:
              - name
              - host_urls
      responses:
        '200':
          content:
            application/json:
              examples:
                postFleetServerHostExample:
                  description: The created Fleet Server host
                  value:
                    item:
                      host_urls:
                      - https://fleet-server.example.com:8220
                      id: fleet-server-host-id-2
                      is_default: false
                      is_preconfigured: false
                      name: My Fleet Server
              schema:
                additionalProperties: false
                type: object
                properties:
                  item:
                    additionalProperties: false
                    type: object
                    properties:
                      host_urls:
                        items:
                          type: string
                        maxItems: 10
                        minItems: 1
                        type: array
                      id:
                        type: string
                      is_default:
                        default: false
                        type: boolean
                      is_internal:
                        type: boolean
                      is_preconfigured:
                        default: false
                        type: boolean
                      name:
                        type: string
                      proxy_id:
                        nullable: true
                        type: string
                      secrets:
                        additionalProperties: false
                        type: object
                        properties:
                          ssl:
                            additionalProperties: false
                            type: object
                            properties:
                              agent_key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                              es_key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                              key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                      ssl:
                        additionalProperties: false
                        nullable: true
                        type: object
                        properties:
                          agent_certificate:
                            type: string
                          agent_certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          agent_key:
                            type: string
                          certificate:
                            type: string
                          certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          client_auth:
                            enum:
                            - optional
                            - required
                            - none
                            type: string
                          es_certificate:
                            type: string
                          es_certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          es_key:
                            type: string
                          key:
                            type: string
                    required:
                    - name
                    - host_urls
                    - id
                required:
                - item
          description: Successful response
        '400':
          content:
            application/json:
              examples:
                genericErrorResponseExample:
                  description: Example of a generic error response
                  value:
                    error: Bad Request
                    message: An error message describing what went wrong
                    statusCode: 400
              schema:
                additionalProperties: false
                description: Generic Error
                type: object
                properties:
                  attributes:
                    nullable: true
                  error:
                    type: string
                  errorType:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: number
                required:
                - message
                - attributes
          description: Bad Request
      summary: Create a Fleet Server host
      tags:
      - Fleet Server hosts
      x-metaTags:
      - content: Kibana
        name: product_name
  /api/fleet/fleet_server_hosts/{itemId}:
    delete:
      description: '**Spaces method and path for this operation:**


        <div><span class="operation-verb delete">delete</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/fleet_server_hosts/{itemId}</span></div>


        Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.


        Delete a Fleet Server host by ID.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.'
      operationId: delete-fleet-fleet-server-hosts-itemid
      parameters:
      - description: A required header to protect against CSRF attacks
        in: header
        name: kbn-xsrf
        required: true
        schema:
          example: 'true'
          type: string
      - description: The ID of the Fleet Server host
        in: path
        name: itemId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                deleteFleetServerHostExample:
                  description: The Fleet Server host was successfully deleted
                  value:
                    id: fleet-server-host-id-1
              schema:
                additionalProperties: false
                type: object
                properties:
                  id:
                    type: string
                required:
                - id
          description: Successful response
        '400':
          content:
            application/json:
              examples:
                genericErrorResponseExample:
                  description: Example of a generic error response
                  value:
                    error: Bad Request
                    message: An error message describing what went wrong
                    statusCode: 400
              schema:
                additionalProperties: false
                description: Generic Error
                type: object
                properties:
                  attributes:
                    nullable: true
                  error:
                    type: string
                  errorType:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: number
                required:
                - message
                - attributes
          description: Bad Request
        '404':
          content:
            application/json:
              examples:
                notFoundExample:
                  description: No Fleet Server host was found with the given ID
                  value:
                    error: Not Found
                    message: Fleet server fleet-server-host-id-1 not found
                    statusCode: 404
          description: Not Found
      summary: Delete a Fleet Server host
      tags:
      - Fleet Server hosts
      x-metaTags:
      - content: Kibana
        name: product_name
    get:
      description: '**Spaces method and path for this operation:**


        <div><span class="operation-verb get">get</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/fleet_server_hosts/{itemId}</span></div>


        Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.


        Get a Fleet Server host by ID.<br/><br/>[Required authorization] Route required privileges: fleet-settings-read.'
      operationId: get-fleet-fleet-server-hosts-itemid
      parameters:
      - description: The ID of the Fleet Server host
        in: path
        name: itemId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                getFleetServerHostExample:
                  description: A Fleet Server host
                  value:
                    item:
                      host_urls:
                      - https://fleet-server.example.com:8220
                      id: fleet-server-host-id-1
                      is_default: true
                      is_preconfigured: false
                      name: Default Fleet Server
              schema:
                additionalProperties: false
                type: object
                properties:
                  item:
                    additionalProperties: false
                    type: object
                    properties:
                      host_urls:
                        items:
                          type: string
                        maxItems: 10
                        minItems: 1
                        type: array
                      id:
                        type: string
                      is_default:
                        default: false
                        type: boolean
                      is_internal:
                        type: boolean
                      is_preconfigured:
                        default: false
                        type: boolean
                      name:
                        type: string
                      proxy_id:
                        nullable: true
                        type: string
                      secrets:
                        additionalProperties: false
                        type: object
                        properties:
                          ssl:
                            additionalProperties: false
                            type: object
                            properties:
                              agent_key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                              es_key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                              key:
                                anyOf:
                                - additionalProperties: false
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                  required:
                                  - id
                                - type: string
                      ssl:
                        additionalProperties: false
                        nullable: true
                        type: object
                        properties:
                          agent_certificate:
                            type: string
                          agent_certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          agent_key:
                            type: string
                          certificate:
                            type: string
                          certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          client_auth:
                            enum:
                            - optional
                            - required
                            - none
                            type: string
                          es_certificate:
                            type: string
                          es_certificate_authorities:
                            items:
                              type: string
                            maxItems: 10
                            type: array
                          es_key:
                            type: string
                          key:
                            type: string
                    required:
                    - name
                    - host_urls
                    - id
                required:
                - item
          description: Successful response
        '400':
          content:
            application/json:
              examples:
                genericErrorResponseExample:
                  description: Example of a generic error response
                  value:
                    error: Bad Request
                    message: An error message describing what went wrong
                    statusCode: 400
              schema:
                additionalProperties: false
                description: Generic Error
                type: object
                properties:
                  attributes:
                    nullable: true
                  error:
                    type: string
                  errorType:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: number
                required:
                - message
                - attributes
          description: Bad Request
        '404':
          content:
            application/json:
              examples:
                notFoundExample:
                  description: No Fleet Server host was found with the given ID
                  value:
                    error: Not Found
                    message: Fleet server fleet-server-host-id-1 not found
                    statusCode: 404
          description: Not Found
      summary: Get a Fleet Server host
      tags:
      - Fleet Server hosts
      x-metaTags:
      - content: Kibana
        name: product_name
    put:
      description: '**Spaces method and path for this operation:**


        <div><span class="operation-verb put">put</span>&nbsp;<span class="operation-path">/s/{space_id}/api/fleet/fleet_server_hosts/{itemId}</span></div>


        Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.


        Update a Fleet Server host by ID.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.'
      operationId: put-fleet-fleet-server-hosts-itemid
      parameters:
      - description: A required header to protect against CSRF attacks
        in: header
        name: kbn-xsrf
        required: true
        schema:
          example: 'true'
          type: string
      - description: The ID of the Fleet Server host
        in: path
        name: itemId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              putFleetServerHostRequestExample:
                description: Update a Fleet Server host
                value:
                  host_urls:
                  - https://updated-fleet-server.example.com:8220
                  is_default: false
                  name: Updated Fleet Server
            schema:
              additionalProperties: false
              type: object
              properties:
                host_urls:
                  items:
                    type: string
                  maxItems: 10
                  minItems: 1
                  type: array
                is_default:
                  type: boolean
                is_internal:
                  type: boolean
                name:
                  type: string
                proxy_id:
                  nullable: true
                  type: string
                secrets:
                  additionalProperties: false
                  type: object
                  properties:
                    ssl:
                      additionalProperties: false
                   

# --- truncated at 32 KB (41 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kibana/refs/heads/main/openapi/kibana-fleet-server-hosts-api-openapi.yml