Context Engine APIs
This page is currently hidden from the documentation navigation.
The following Context Engine pages are live:
Use the Context Engine APIs to manage AI indices, inspect their configuration, and query their Knowledge Indicators (KIs) with ES|QL. The Kibana API reference provides their complete parameters, request and response schemas, and errors.
Turn on the contextEngine:enabled advanced setting in each Kibana space where you want to use the APIs. Requests to a space where the setting is turned off return 404.
API requests use the permissions and space of the authenticated caller. Include the space in the request URL when you are not using the default space.
The caller also needs the read index privilege on each AI index's backing index (ai-index-*). AI indices without it are left out of list results, and query requests against them return 403.
The following operations are available:
| Operation | Endpoint |
|---|---|
| List AI indices | GET /api/context_engine/ai_index |
| Create an AI index | POST /api/context_engine/ai_index |
| Query AI indices | POST /api/context_engine/ai_index/_query |
| Get an AI index | GET /api/context_engine/ai_index/{aiIndexId} |
| Create or update an AI index | PUT /api/context_engine/ai_index/{aiIndexId} |
| Delete an AI index | DELETE /api/context_engine/ai_index/{aiIndexId} |
| Describe an AI index | GET /api/context_engine/ai_index/{aiIndexId}/_describe |
For task-oriented examples, refer to Create and manage AI indices, Add and manage sources, and Query AI indices from LangChain.