Elastic Stack (ELK Stack) data views API

Data view APIs enable you to manage data views, formerly known as Kibana index patterns.

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/data_views List all data views in a Kibana space · Get all data views #
Ask an LLM
“What data views are available in my Kibana space?”
“Which index patterns have been set up as data views?”
Tell an agent
List every data view in this space.
Show me all data views and their IDs.
POST /api/data_views/data_view Create a data view · Create a data view #
Ask an LLM
“How do I create a data view over my logs indices in Kibana?”
“Can a data view point at several data streams or aliases at once?”
Tell an agent
Create a data view defined as {data_view}.
Create data view {data_view}, overwriting any existing one with the same name ({override}).
DELETE /api/data_views/data_view/{viewId} Delete a data view · Delete a data view #
Ask an LLM
“Can a deleted data view be recovered?”
“How do I remove a data view I no longer use?”
Tell an agent destructive · confirm first
Delete data view {view_id}.
Permanently remove data view {view_id}.
GET /api/data_views/data_view/{viewId} Get a data view · Get a data view #
Ask an LLM
“What index pattern and fields does a particular data view use?”
“Which runtime fields are defined on one data view?”
Tell an agent
Show data view {view_id}.
Get the fields and pattern of data view {view_id}.
POST /api/data_views/data_view/{viewId} Update a data view · Update a data view #
Ask an LLM
“Can I change the index pattern of an existing data view?”
“Is it possible to refresh a data view's field list while updating it?”
Tell an agent
Update data view {view_id} with {data_view}.
Change data view {view_id} to {data_view} and refresh its fields ({refresh_fields}).
POST /api/data_views/data_view/{viewId}/fields Set labels and formats on data view fields · Update field metadata #
Ask an LLM
“Can I give a field a custom label or description in a data view?”
“Where do I override the display format for a field?”
Tell an agent
Update field metadata on data view {view_id} to {fields}.
Set custom labels and formats {fields} in data view {view_id}.
POST /api/data_views/data_view/{viewId}/runtime_field Add a new runtime field to a data view · Create a runtime field #
Ask an LLM
“How do I add a computed field to a data view without reindexing?”
“Can a new runtime field use a Painless script?”
Tell an agent
Add runtime field {name} to data view {view_id} with {runtime_field}.
Create a new Painless runtime field {name} on {view_id}: {runtime_field}.
PUT /api/data_views/data_view/{viewId}/runtime_field Create or replace a runtime field · Create or update a runtime field #
Ask an LLM
“Can I upsert a runtime field so it's replaced if it already exists?”
“What happens to an existing runtime field when I put a new definition?”
Tell an agent
Create or replace runtime field {name} on data view {view_id} with {runtime_field}.
Upsert runtime field {name} in {view_id} using definition {runtime_field}.
DELETE /api/data_views/data_view/{viewId}/runtime_field/{fieldName} Delete a runtime field · Delete a runtime field #
Ask an LLM
“How do I remove a runtime field from a data view?”
“Can I drop a computed field I no longer need?”
Tell an agent destructive · confirm first
Delete runtime field {field_name} from data view {view_id}.
Remove {field_name} from {view_id}.
GET /api/data_views/data_view/{viewId}/runtime_field/{fieldName} Get a runtime field from a data view · Get a runtime field #
Ask an LLM
“What script does a specific runtime field run?”
“What type is one runtime field in my data view?”
Tell an agent
Show runtime field {field_name} in data view {view_id}.
Get the definition of {field_name} from {view_id}.
POST /api/data_views/data_view/{viewId}/runtime_field/{fieldName} Update an existing runtime field · Update a runtime field #
Ask an LLM
“Can I tweak just the script of an existing runtime field?”
“Does updating a runtime field change only the properties I send?”
Tell an agent
Update runtime field {field_name} in {view_id} with {runtime_field}.
Modify existing runtime field {field_name} on data view {view_id}: {runtime_field}.
GET /api/data_views/default Get the default data view · Get the default data view #
Ask an LLM
“Which data view is the default in this space?”
“What data view does Kibana fall back to when none is picked?”
Tell an agent
Show the default data view ID.
Tell me which data view is set as default.
POST /api/data_views/default Set the default data view · Set the default data view #
Ask an LLM
“How do I change which data view is the default in my space?”
“Can I force a new default data view even if one is already set?”
Tell an agent
Make {data_view_id} the default data view.
Set {data_view_id} as default, forcing the change ({force}).
POST /api/data_views/swap_references Repoint saved objects to another data view · Swap saved object references #
Ask an LLM
“Can I move all dashboards from one data view to another?”
“Is it possible to delete the old data view after swapping references?”
Tell an agent
Swap saved object references from {from_id} to {to_id}.
Repoint references from data view {from_id} to {to_id} and delete the old one ({delete}).
POST /api/data_views/swap_references/_preview Preview a data view reference swap · Preview swap references #
Ask an LLM
“Which saved objects would be affected if I swap data views?”
“Can I dry-run a data view reference swap before applying it?”
Tell an agent
Preview swapping references from {from_id} to {to_id}.
List the objects that would move from {from_id} to {to_id} without changing anything.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack:elk-stack-data-views-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-data-views-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: Kibana Team
  description: The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.
  title: Kibana data views API
  version: ''
  x-doc-license:
    name: Attribution-NonCommercial-NoDerivatives 4.0 International
    url: https://creativecommons.org/licenses/by-nc-nd/4.0/
  x-feedbackLink:
    label: Feedback
    url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
servers:
- url: https://{kibana_url}
  variables:
    kibana_url:
      default: localhost:5601
security:
- apiKeyAuth: []
- basicAuth: []
tags:


# --- truncated at 32 KB (91 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-data-views-api-openapi.yml