Apply DataView indices to all installed engines

POST /api/entity_store/engines/apply_dataview_indices

Spaces method and path for this operation:

post /s/{space_id}/api/entity_store/engines/apply_dataview_indices

Refer to 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 application/json

    Successful response

    Hide response attributes Show response attributes object
    • result array[object]

      Per-engine update results.

      Hide result attributes Show result attributes object

      The result of applying data view index changes to a single engine.

      • changes object

        The changes applied to the engine.

        Hide changes attribute Show changes attribute object
        • indexPatterns array[string]

          The updated list of index patterns now used by the engine.

      • type string Required

        The entity type of the engine that was updated.

    • success boolean

      Whether all engines updated successfully.

  • 207 application/json

    Partial successful response

    Hide response attributes Show response attributes object
    • errors array[string]

      Error messages for engines that failed to update.

    • result array[object]

      Per-engine update results for engines that succeeded.

      Hide result attributes Show result attributes object

      The result of applying data view index changes to a single engine.

      • changes object

        The changes applied to the engine.

        Hide changes attribute Show changes attribute object
        • indexPatterns array[string]

          The updated list of index patterns now used by the engine.

      • type string Required

        The entity type of the engine that was updated.

    • success boolean

      Always false for a partial success.

  • 500 application/json

    Error response

    Hide response attributes Show response attributes object
    • body string

      Error message.

    • statusCode number

      HTTP status code.

POST /api/entity_store/engines/apply_dataview_indices
curl \
 --request POST 'https://localhost:5601/api/entity_store/engines/apply_dataview_indices' \
 --header "Authorization: $API_KEY"
Response examples (200)
All running engines were successfully updated with the current data view index patterns.
{
  "result": [
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*",
          "auditbeat-*"
        ]
      },
      "type": "host"
    },
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*",
          "auditbeat-*"
        ]
      },
      "type": "user"
    }
  ],
  "success": true
}
Response examples (207)
The host engine was updated but the user engine failed due to insufficient privileges.
{
  "errors": [
    "Failed to update user engine: insufficient privileges"
  ],
  "result": [
    {
      "changes": {
        "indexPatterns": [
          "logs-*",
          "filebeat-*"
        ]
      },
      "type": "host"
    }
  ],
  "success": false
}
Response examples (500)
An unexpected error occurred while applying data view indices.
{
  "body": "An internal error occurred while updating engine indices",
  "statusCode": 500
}