---
type: api
title: Apply DataView indices to all installed engines
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-applyentityenginedataviewindices
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v8/operation/operation-applyentityenginedataviewindices
products:
  - Kibana
---

# Apply DataView indices to all installed engines

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

## Paths

- `POST` `/api/entity_store/engines/apply_dataview_indices`
- `POST` `/s/{space_id}/api/entity_store/engines/apply_dataview_indices`

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

## Description

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

Synchronize data view index patterns to all running entity engines so that newly added indices are picked up by the transforms.

## Responses

#### `200`

Successful response

`application/json`

- `result` ([] object)
  Per-engine update results.
  - `changes` (object)
    The changes applied to the engine.
    - `indexPatterns` ([] string)
      The updated list of index patterns now used by the engine.
  - `type` (string)
    The entity type of the engine that was updated.
- `success` (boolean)
  Whether all engines updated successfully.
#### `207`

Partial successful response

`application/json`

- `errors` ([] string)
  Error messages for engines that failed to update.
- `result` ([] object)
  Per-engine update results for engines that succeeded.
  - `changes` (object)
    The changes applied to the engine.
    - `indexPatterns` ([] string)
      The updated list of index patterns now used by the engine.
  - `type` (string)
    The entity type of the engine that was updated.
- `success` (boolean)
  Always `false` for a partial success.
#### `500`

Error response

`application/json`

- `body` (string)
  Error message.
- `statusCode` (number)
  HTTP status code.
## Code Examples

#### Console

```console
POST /api/entity_store/engines/apply_dataview_indices
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/entity_store/engines/apply_dataview_indices"
```

## Response Examples

#### All engines updated

All running engines were successfully updated with the current data view index patterns.

```json
{
  "result": [
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*",
          "auditbeat-*"
        ]
      },
      "type": "host"
    },
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*",
          "auditbeat-*"
        ]
      },
      "type": "user"
    }
  ],
  "success": true
}
```

#### One engine failed

The host engine was updated but the user engine failed due to insufficient privileges.

```json
{
  "errors": [
    "Failed to update user engine: insufficient privileges"
  ],
  "result": [
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*"
        ]
      },
      "type": "host"
    }
  ],
  "success": false
}
```

#### Internal server error

An unexpected error occurred while applying data view indices.

```json
{
  "body": "An internal error occurred while updating engine indices",
  "statusCode": 500
}
```

