---
type: api
title: Disable the history snapshot task
description: Disable the Entity Store history snapshot task for this space so it no longer creates snapshot indices. Existing snapshot indices remain unless you set `clearHistorySnapshots` to `true`. Returns 404 if the Entity Store is not installed in the current space.<br/><br/>[Required authorization] Route required privileges: securitySolution.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-security-entity-store-history-snapshot-disable
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v0/operation/operation-put-security-entity-store-history-snapshot-disable
products:
  - Kibana
---

# Disable the history snapshot task

Availability: Planned

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

## Paths

- `PUT` `/api/security/entity_store/history_snapshot/disable`

## Description

Disable the Entity Store history snapshot task for this space so it no longer creates snapshot indices. Existing snapshot indices remain unless you set `clearHistorySnapshots` to `true`. Returns 404 if the Entity Store is not installed in the current space.

## Required authorization

- Privileges: `securitySolution`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

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

## Request body

`application/json`

- `clearHistorySnapshots` (boolean · default: false) — optional
  When `true`, deletes existing history snapshot indices for this space in the background after the task is disabled. The response returns immediately and does not wait for deletion to finish. Deletion failures are logged and are not returned to the caller. If the task is already disabled, the request succeeds and does not delete indices. Defaults to `false`.

## Responses

#### `200`

Indicates a successful response.

`application/json`

#### `404`

Entity store is not installed.

`application/json`

## Code examples

#### Console

```console
PUT kbn://api/security/entity_store/history_snapshot/disable
{}
```

#### Console

```console
PUT kbn://api/security/entity_store/history_snapshot/disable
{
  "clearHistorySnapshots": true
}
```

#### curl

```curl
curl -X PUT -H "kbn-xsrf: true" -H "Content-Type: application/json" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -d '{}' \
  "${KIBANA_URL}/api/security/entity_store/history_snapshot/disable"
```

#### curl

```curl
curl -X PUT -H "kbn-xsrf: true" -H "Content-Type: application/json" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -d '{"clearHistorySnapshots":true}' \
  "${KIBANA_URL}/api/security/entity_store/history_snapshot/disable"
```

## Response examples

#### History snapshot task disabled

The Entity Store history snapshot task was disabled.

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

#### Entity store not installed

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

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

