---
type: api
title: Check Fleet Server health
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-health-check
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-post-fleet-health-check
products:
  - Kibana
---

# Check Fleet Server health

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/fleet/health_check`
- `POST` `/s/{space_id}/api/fleet/health_check`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

## Description

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

Check the health status of a Fleet Server instance by its host ID. Returns the server status and name if available.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Request Body

`application/json`

- `id` (string) — required

## Responses

#### `200`

Successful health check response

`application/json`

- `host_id` (string)
- `name` (string)
- `status` (string)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not Found

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
POST /api/fleet/health_check
{
  "id": "fleet-server-host-id-1"
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/health_check" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "fleet-server-host-id-1"
}'
```

## Response Examples

#### Post health check healthy

Fleet Server is online and healthy

```json
{
  "name": "fleet-server-1",
  "status": "ONLINE"
}
```

#### Post health check unreachable

Fleet Server host is not reachable (request timed out or aborted)

```json
{
  "host_id": "fleet-server-host-id-1",
  "status": "OFFLINE"
}
```

#### Bad request

The host ID exists but has no associated host URLs configured

```json
{
  "error": "Bad Request",
  "message": "The requested host id fleet-server-host-id-1 does not have associated host urls.",
  "statusCode": 400
}
```

#### Not found

No Fleet Server host was found with the given ID

```json
{
  "error": "Not Found",
  "message": "The requested host id fleet-server-host-id-1 does not exist.",
  "statusCode": 404
}
```

