Delete an AI Index

Base URL
https://{kibana_url}
Auth

Deletes an AI Index by ID.

By default, the API preserves the backing data stream or index, its Knowledge Indicators, and attached workflow automations. Set delete_knowledge_indicators to true to delete the backing data stream or index and its Knowledge Indicators. Set delete_automations to true to delete the attached workflow automations.

The API does not delete the backing data stream or index when another AI Index uses the same destination.

Returns a 404 response when Context Engine is turned off in this space (contextEngine:enabled).

For more information, refer to the Context Engine documentation.

Required authorization

Privileges contextEngine:write. Extended privileges (optional, expand functionality when granted): workflowsManagement:delete

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

aiIndexId string · min length: 1 · max length: 256 required

The unique identifier of the AI Index.

Query parameters

delete_knowledge_indicators boolean · default: false

When true, also delete the backing data stream/index, which removes its Knowledge Indicators. Skipped when another AI Index still uses the same dest. Defaults to false.

delete_automations boolean · default: false

When true, also delete the attached workflow automations. Defaults to false.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Responses

The AI Index entry was deleted. errors lists any best-effort cleanup failures.

application/json
acknowledged boolean required

Whether the AI Index entry was deleted.

errors string[] required

Best-effort cleanup errors after the entry was deleted, if any.

No AI Index with the given ID exists in the current space, or Context Engine is turned off in this space.

application/json
error string

The HTTP status text.

message string required

A human-readable error message.

statusCode number

The HTTP status code.

The AI Index is managed and cannot be deleted.

application/json
error string

The HTTP status text.

message string required

A human-readable error message.

statusCode number

The HTTP status code.

Base URL
https://{kibana_url}