---
type: api
title: Enable the history snapshot task
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-put-security-entity-store-history-snapshot-enable
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-put-security-entity-store-history-snapshot-enable
products:
  - Kibana
---

# Enable the history snapshot task

Availability:

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

## Paths

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

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

## Description

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

Enable the Entity Store history snapshot task for this space. After a successful enable, Kibana schedules an immediate snapshot run. If that immediate run fails, the response is still 200 and the task remains enabled for the next scheduled interval. If the task is already enabled, the request succeeds and does not start an extra run. Returns 404 if the Entity Store is not installed in the current space.<br/><br/>[Required authorization] Route required privileges: securitySolution.

## Responses

#### `200`

Indicates a successful response.

#### `404`

Entity store is not installed.

## Code Examples

#### Console

```console
PUT kbn://api/security/entity_store/history_snapshot/enable
```

#### curl

```curl
curl -X PUT -H "kbn-xsrf: true" -H "Authorization: ApiKey ${API_KEY}" \
  "${KIBANA_URL}/api/security/entity_store/history_snapshot/enable"
```

## Response Examples

#### History snapshot task enabled

The Entity Store history snapshot task was enabled.

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

#### Entity store not installed

The Entity Store history snapshot task cannot be enabled because the entity store is not installed.

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

