---
type: api
title: Update the Entity Store
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-security-entity-store
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-security-entity-store
products:
  - Kibana
---

# Update the Entity Store

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

## Paths

- `PUT` `/api/security/entity_store`
- `PUT` `/s/{space_id}/api/security/entity_store`

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

## Description

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

Update the Entity Store log extraction configuration.<br/><br/>[Required authorization] Route required privileges: securitySolution.

## Request Body

`application/json`

- `logExtraction` (object) — required
  - `additionalIndexPatterns` ([] string) — optional
  - `delay` (string · pattern: [smdh]$) — optional
  - `docsLimit` (integer · min: 1 · max: 9007199254740991) — optional
  - `excludedIndexPatterns` ([] string) — optional
  - `fieldHistoryLength` (integer · min: -9007199254740991 · max: 9007199254740991) — optional
  - `frequency` (string · pattern: [smdh]$) — optional
  - `lookbackPeriod` (string · pattern: [smdh]$) — optional
  - `maxLogsPerPage` (integer · min: 1 · max: 9007199254740991) — optional
  - `maxLogsPerWindow` (integer · min: 0 · max: 9007199254740991) — optional
  - `maxLogsPerWindowCapBehavior` (enum) — optional
    Values: `defer`, `drop`
  - `maxTimeWindowSize` (string · pattern: [smdh]$) — optional

## Responses

#### `200`

Indicates a successful response.

#### `400`

Bad request.

#### `404`

Entity Store not found.

## Code Examples

#### Console

```console
PUT kbn://api/security/entity_store
{
  "logExtraction": {
    "lookbackPeriod": "6h",
    "frequency": "10m",
    "fieldHistoryLength": 15
  }
}
```

#### curl

```curl
curl -X PUT -H "kbn-xsrf: true" -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"logExtraction":{"lookbackPeriod":"6h","frequency":"10m","fieldHistoryLength":15}}' \
  "${KIBANA_URL}/api/security/entity_store"
```

## Response Examples

#### Entity Store updated

The Entity Store configuration was successfully updated.

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

#### Invalid duration parameter

A log extraction parameter has an invalid duration format.

```json
{
  "error": "Bad Request",
  "message": "[request body]: logExtraction.frequency: must be a valid duration of at least 30 seconds (e.g. 1m, 30s)",
  "statusCode": 400
}
```

#### Entity Store not installed

The Entity Store has not been installed yet.

```json
{
  "error": "Not Found",
  "message": "Entity store is not installed",
  "statusCode": 404
}
```

