---
type: api
title: "Install the Entity Store"
description: "Install the Entity Store and create engines for the specified entity types. A single logExtraction configuration is shared across all entity types. Supply it once at install to customize settings; omit it (or send an empty object) to use defaults on first install or preserve the existing configuration on re-install. To change settings after install, use the update endpoint. [Required authorization] Route required privileges: securitySolution."
url: https://www.elastic.co/elastic/docs-builder/docs/5112/api/kibana/operation/operation-post-security-entity-store-install
resource: https://www.elastic.co/elastic/docs-builder/docs/5112/api/kibana/operation/operation-post-security-entity-store-install
products:
  - Kibana
---

# Install the Entity Store

Authentication: required

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

## Paths

- `POST` `/api/security/entity_store/install`
- `POST` `/s/{space_id}/api/security/entity_store/install`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

Install the Entity Store and create engines for the specified entity types. A single `logExtraction` configuration is shared across all entity types. Supply it once at install to customize settings; omit it (or send an empty object) to use defaults on first install or preserve the existing configuration on re-install. To change settings after install, use the update endpoint.

## Required privileges

- Privileges: `securitySolution`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `entityTypes` (enum[] · default: ["user","host","service","generic"]) — optional
  Values: `user`, `host`, `service`, `generic`
- `historySnapshot` (object) — optional
  - `frequency` (string · pattern: [smdh]$ · default: 24h) — optional
- `logExtraction` (object) — optional
  - `additionalIndexPatterns` (string[] · default: []) — optional
  - `delay` (string · pattern: [smdh]$ · default: 1m) — optional
  - `docsLimit` (integer · min: 1 · max: 9007199254740991 · default: 10000) — optional
  - `excludedIndexPatterns` (string[] · default: []) — optional
  - `fieldHistoryLength` (integer · min: -9007199254740991 · max: 9007199254740991 · default: 10) — optional
  - `frequency` (string · pattern: [smdh]$ · default: 1m) — optional
  - `lookbackPeriod` (string · pattern: [smdh]$ · default: 3h) — optional
  - `maxLogsPerPage` (integer · min: 1 · max: 9007199254740991 · default: 50000) — optional
  - `maxLogsPerWindow` (integer · min: 0 · max: 9007199254740991 · default: 100000) — optional
  - `maxLogsPerWindowCapBehavior` (enum · default: drop) — optional
    Values: `defer`, `drop`
  - `maxTimeWindowSize` (string · pattern: [smdh]$ · default: 15m) — optional

## Responses

#### `200`

Indicates all requested entity types are already installed.

`application/json`

#### `201`

Indicates the Entity Store was successfully installed.

`application/json`

#### `403`

Insufficient privileges.

`application/json`

## Code examples

#### Console

```console
POST kbn://api/security/entity_store/install
{
  "entityTypes": ["user", "host", "service", "generic"],
  "logExtraction": {}
}
```

#### curl

```curl
curl -X POST -H "kbn-xsrf: true" -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"entityTypes":["user","host","service","generic"],"logExtraction":{}}' \
  "${KIBANA_URL}/api/security/entity_store/install"
```

## Response examples

#### Already installed

`application/json`

All requested entity types were already installed.

```json
{
  "ok": true
}
```

#### Entity Store installed

`application/json`

The Entity Store was installed and engines are being created.

```json
{
  "ok": true
}
```

#### Insufficient privileges

`application/json`

The user does not have the required Elasticsearch privileges.

```json
{
  "error": "Forbidden",
  "message": "User \u0027analyst\u0027 has insufficient privileges",
  "statusCode": 403
}
```

