Kibana data views API
Data view APIs enable you to manage data views, formerly known as Kibana index patterns.
Data view APIs enable you to manage data views, formerly known as Kibana index patterns.
openapi: 3.0.3
info:
contact:
name: Kibana Team
description: 'The Kibana REST APIs enable you to manage resources such as connectors, data views, and saved objects.
The API calls are stateless.
Each request that you make happens in isolation from other calls and must include all of the necessary information for Kibana to fulfill the
request.
API requests return JSON output, which is a format that is machine-readable and works well for automation.
To interact with Kibana APIs, use the following operations:
- GET: Fetches the information.
- PATCH: Applies partial modifications to the existing information.
- POST: Adds new information.
- PUT: Updates the existing information.
- DELETE: Removes the information.
You can prepend any Kibana API endpoint with `kbn:` and run the request in **Dev Tools → Console**.
For example:
```
GET kbn:/api/data_views
```
For more information about the console, refer to [Run API requests](https://www.elastic.co/docs/explore-analyze/query-filter/tools/console).
NOTE: Access to internal Kibana API endpoints will be restricted in Kibana version 9.0. Please move any integrations to publicly documented APIs.
## Documentation source and versions
This documentation is derived from the `main` branch of the [kibana](https://github.com/elastic/kibana) repository.
It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).
This documentation contains work-in-progress information for future Elastic Stack releases.
'
title: Kibana APIs Actions 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:
- description: Data view APIs enable you to manage data views, formerly known as Kibana index patterns.
name: data views
x-displayName: Data views
paths:
/api/data_views:
get:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb get">get</span> <span class="operation-path">/s/{space_id}/api/data_views</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Retrieve a list of all data views. Use this endpoint to identify available data views in the current Kibana space.
'
operationId: getAllDataViewsDefault
responses:
'200':
content:
application/json:
examples:
getAllDataViewsResponse:
$ref: '#/components/examples/Data_views_get_data_views_response'
schema:
type: object
properties:
data_view:
items:
type: object
properties:
id:
type: string
name:
type: string
namespaces:
items:
type: string
type: array
title:
type: string
typeMeta:
type: object
type: array
description: Indicates a successful call.
'400':
content:
application/json:
examples:
getAllDataViewsBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Get all data views
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X GET \"${KIBANA_URL}/api/data_views\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n"
- lang: Console
source: 'GET kbn://api/data_views
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/data_view:
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Create a data view. Data views identify the Elasticsearch data you want to explore and visualize. They can point to one or more data streams, indices, or index aliases, and use optional runtime fields to compute values at query time. Note that data views are not required for ES|QL-based visualizations. To learn more, refer to the [data views documentation](https://www.elastic.co/docs/explore-analyze/find-and-organize/data-views).
'
operationId: createDataViewDefaultw
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
requestBody:
content:
application/json:
examples:
createDataViewRequest:
$ref: '#/components/examples/Data_views_create_data_view_request'
schema:
$ref: '#/components/schemas/Data_views_create_data_view_request_object'
required: true
responses:
'200':
content:
application/json:
examples:
createDataViewResponse:
$ref: '#/components/examples/Data_views_create_data_view_response'
schema:
$ref: '#/components/schemas/Data_views_data_view_response_object'
description: Indicates a successful call.
'400':
content:
application/json:
examples:
createDataViewBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Create a data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/data_view\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"data_view\":{\"title\":\"logstash-*\",\"name\":\"My Logstash data view\"}}'\n"
- lang: Console
source: 'POST kbn://api/data_views/data_view
{"data_view":{"title":"logstash-*","name":"My Logstash data view"}}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/data_view/{viewId}:
delete:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb delete">delete</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Delete a data view by its identifier. WARNING: When you delete a data view, it cannot be recovered.
'
operationId: deleteDataViewDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
- $ref: '#/components/parameters/Data_views_view_id'
responses:
'204':
description: Indicates a successful call.
'404':
content:
application/json:
examples:
deleteDataViewNotFound:
$ref: '#/components/examples/Data_views_error_404_response'
schema:
$ref: '#/components/schemas/Data_views_404_response'
description: Object is not found.
summary: Delete a data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X DELETE \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\"\n"
- lang: Console
source: 'DELETE kbn://api/data_views/data_view/{viewId}
'
x-metaTags:
- content: Kibana
name: product_name
get:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb get">get</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Retrieve a single data view by its identifier. Data views identify the Elasticsearch data you want to explore and visualize. They can point to one or more data streams, indices, or index aliases, and use optional runtime fields to compute values at query time. Note that data views are not required for ES|QL-based visualizations. To learn more, refer to the [data views documentation](https://www.elastic.co/docs/explore-analyze/find-and-organize/data-views).
'
operationId: getDataViewDefault
parameters:
- $ref: '#/components/parameters/Data_views_view_id'
responses:
'200':
content:
application/json:
examples:
getDataViewResponse:
$ref: '#/components/examples/Data_views_get_data_view_response'
schema:
$ref: '#/components/schemas/Data_views_data_view_response_object'
description: Indicates a successful call.
'404':
content:
application/json:
examples:
getDataViewNotFound:
$ref: '#/components/examples/Data_views_error_404_response'
schema:
$ref: '#/components/schemas/Data_views_404_response'
description: Object is not found.
summary: Get a data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X GET \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n"
- lang: Console
source: 'GET kbn://api/data_views/data_view/{viewId}
'
x-metaTags:
- content: Kibana
name: product_name
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Update an existing data view. Only the fields provided in the request body are updated.
'
operationId: updateDataViewDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
- $ref: '#/components/parameters/Data_views_view_id'
requestBody:
content:
application/json:
examples:
updateDataViewRequest:
$ref: '#/components/examples/Data_views_update_data_view_request'
schema:
$ref: '#/components/schemas/Data_views_update_data_view_request_object'
required: true
responses:
'200':
content:
application/json:
examples:
updateDataViewResponse:
$ref: '#/components/examples/Data_views_get_data_view_response'
schema:
$ref: '#/components/schemas/Data_views_data_view_response_object'
description: Indicates a successful call.
'400':
content:
application/json:
examples:
updateDataViewBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Update a data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"data_view\":{\"name\":\"Updated data view name\"}}'\n"
- lang: Console
source: 'POST kbn://api/data_views/data_view/{viewId}
{"data_view":{"name":"Updated data view name"}}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/data_view/{viewId}/fields:
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/fields</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Update field metadata for a data view. Use this endpoint to set custom labels, custom descriptions, and format overrides for individual fields.
'
operationId: updateFieldsMetadataDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
- $ref: '#/components/parameters/Data_views_view_id'
requestBody:
content:
application/json:
examples:
updateFieldsMetadataRequest:
$ref: '#/components/examples/Data_views_update_field_metadata_request'
schema:
type: object
properties:
fields:
description: The field object.
type: object
required:
- fields
required: true
responses:
'200':
content:
application/json:
examples:
updateFieldsMetadataResponse:
$ref: '#/components/examples/Data_views_update_field_metadata_response'
schema:
type: object
properties:
acknowledged:
type: boolean
description: Indicates a successful call.
'400':
content:
application/json:
examples:
updateFieldsMetadataBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Update field metadata
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/fields\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"fields\":{\"field_name\":{\"customLabel\":\"My custom label\"}}}'\n"
- lang: Console
source: 'POST kbn://api/data_views/data_view/{viewId}/fields
{"fields":{"field_name":{"customLabel":"My custom label"}}}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/data_view/{viewId}/runtime_field:
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Create a runtime field for a data view. Runtime fields are computed at query time using a [Painless script](https://www.elastic.co/docs/explore-analyze/scripting/modules-scripting-painless) and do not require reindexing. If no `script` is provided, the runtime field returns the corresponding value from the document `_source`.
'
operationId: createRuntimeFieldDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
- $ref: '#/components/parameters/Data_views_view_id'
requestBody:
content:
application/json:
examples:
createRuntimeFieldRequest:
$ref: '#/components/examples/Data_views_create_runtime_field_request'
schema:
type: object
properties:
name:
description: 'The name for a runtime field.
'
type: string
runtimeField:
description: 'The runtime field definition object.
'
type: object
required:
- name
- runtimeField
required: true
responses:
'200':
content:
application/json:
examples:
createRuntimeFieldResponse:
$ref: '#/components/examples/Data_views_create_runtime_field_response'
schema:
type: object
description: Indicates a successful call.
summary: Create a runtime field
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\":\"hour_of_day\",\"runtimeField\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['\"'\"'timestamp'\"'\"'].value.getHour())\"}}}'\n"
- lang: Console
source: 'POST kbn://api/data_views/data_view/{viewId}/runtime_field
{"name":"hour_of_day","runtimeField":{"type":"long","script":{"source":"emit(doc[''timestamp''].value.getHour())"}}}
'
x-metaTags:
- content: Kibana
name: product_name
put:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb put">put</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Create or update a runtime field for a data view. If the runtime field already exists, it is replaced with the new definition.
'
operationId: createUpdateRuntimeFieldDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
- description: 'The ID of the data view fields you want to update.
'
in: path
name: viewId
required: true
schema:
type: string
requestBody:
content:
application/json:
examples:
updateRuntimeFieldRequest:
$ref: '#/components/examples/Data_views_create_runtime_field_request'
schema:
type: object
properties:
name:
description: 'The name for a runtime field.
'
type: string
runtimeField:
description: 'The runtime field definition object.
'
type: object
required:
- name
- runtimeField
required: true
responses:
'200':
content:
application/json:
examples:
createUpdateRuntimeFieldResponse:
$ref: '#/components/examples/Data_views_create_runtime_field_response'
schema:
type: object
properties:
data_view:
type: object
fields:
items:
type: object
type: array
description: Indicates a successful call.
'400':
content:
application/json:
examples:
createUpdateRuntimeFieldBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Create or update a runtime field
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X PUT \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\":\"hour_of_day\",\"runtimeField\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['\"'\"'timestamp'\"'\"'].value.getHour())\"}}}'\n"
- lang: Console
source: 'PUT kbn://api/data_views/data_view/{viewId}/runtime_field
{"name":"hour_of_day","runtimeField":{"type":"long","script":{"source":"emit(doc[''timestamp''].value.getHour())"}}}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/data_view/{viewId}/runtime_field/{fieldName}:
delete:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb delete">delete</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Delete a runtime field from a data view.
'
operationId: deleteRuntimeFieldDefault
parameters:
- $ref: '#/components/parameters/Data_views_field_name'
- $ref: '#/components/parameters/Data_views_view_id'
responses:
'200':
description: Indicates a successful call.
'404':
content:
application/json:
examples:
deleteRuntimeFieldNotFound:
$ref: '#/components/examples/Data_views_error_404_response'
schema:
$ref: '#/components/schemas/Data_views_404_response'
description: Object is not found.
summary: Delete a runtime field
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X DELETE \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field/${FIELD_NAME}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\"\n"
- lang: Console
source: 'DELETE kbn://api/data_views/data_view/{viewId}/runtime_field/{fieldName}
'
x-metaTags:
- content: Kibana
name: product_name
get:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb get">get</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Retrieve a single runtime field by name from a data view.
'
operationId: getRuntimeFieldDefault
parameters:
- $ref: '#/components/parameters/Data_views_field_name'
- $ref: '#/components/parameters/Data_views_view_id'
responses:
'200':
content:
application/json:
examples:
getRuntimeFieldResponse:
$ref: '#/components/examples/Data_views_get_runtime_field_response'
schema:
type: object
properties:
data_view:
type: object
fields:
items:
type: object
type: array
description: Indicates a successful call.
'404':
content:
application/json:
examples:
getRuntimeFieldNotFound:
$ref: '#/components/examples/Data_views_error_404_response'
schema:
$ref: '#/components/schemas/Data_views_404_response'
description: Object is not found.
summary: Get a runtime field
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X GET \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field/${FIELD_NAME}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n"
- lang: Console
source: 'GET kbn://api/data_views/data_view/{viewId}/runtime_field/{fieldName}
'
x-metaTags:
- content: Kibana
name: product_name
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/data_view/{viewId}/runtime_field/{fieldName}</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Update an existing runtime field in a data view. Only the fields provided in the request body are updated.
'
operationId: updateRuntimeFieldDefault
parameters:
- $ref: '#/components/parameters/Data_views_field_name'
- $ref: '#/components/parameters/Data_views_view_id'
requestBody:
content:
application/json:
examples:
updateRuntimeFieldRequest:
$ref: '#/components/examples/Data_views_update_runtime_field_request'
schema:
type: object
properties:
runtimeField:
description: 'The runtime field definition object.
You can update following fields:
- `type`
- `script`
'
type: object
required:
- runtimeField
required: true
responses:
'200':
description: Indicates a successful call.
'400':
content:
application/json:
examples:
updateRuntimeFieldBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Update a runtime field
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/data_view/${DATA_VIEW_ID}/runtime_field/${FIELD_NAME}\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"runtimeField\":{\"type\":\"long\",\"script\":{\"source\":\"emit(doc['\"'\"'timestamp'\"'\"'].value.getHour())\"}}}'\n"
- lang: Console
source: 'POST kbn://api/data_views/data_view/{viewId}/runtime_field/{fieldName}
{"runtimeField":{"type":"long","script":{"source":"emit(doc[''timestamp''].value.getHour())"}}}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/default:
get:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb get">get</span> <span class="operation-path">/s/{space_id}/api/data_views/default</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Retrieve the identifier of the default data view for the current Kibana space.
'
operationId: getDefaultDataViewDefault
responses:
'200':
content:
application/json:
examples:
getDefaultDataViewResponse:
$ref: '#/components/examples/Data_views_get_default_data_view_response'
schema:
type: object
properties:
data_view_id:
type: string
description: Indicates a successful call.
'400':
content:
application/json:
examples:
getDefaultDataViewBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Get the default data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X GET \"${KIBANA_URL}/api/data_views/default\" \\\n -H \"Authorization: ApiKey ${API_KEY}\"\n"
- lang: Console
source: 'GET kbn://api/data_views/default
'
x-metaTags:
- content: Kibana
name: product_name
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/default</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Set the default data view for the current Kibana space. The default data view is used as a fallback when no specific data view is selected.
'
operationId: setDefaultDatailViewDefault
parameters:
- $ref: '#/components/parameters/Data_views_kbn_xsrf'
requestBody:
content:
application/json:
examples:
setDefaultDataViewRequest:
$ref: '#/components/examples/Data_views_set_default_data_view_request'
schema:
type: object
properties:
data_view_id:
description: 'The data view identifier. NOTE: The API does not validate whether it is a valid identifier. Use `null` to unset the default data view.
'
nullable: true
type: string
force:
default: false
description: Update an existing default data view identifier.
type: boolean
required:
- data_view_id
required: true
responses:
'200':
content:
application/json:
examples:
setDefaultDataViewResponse:
$ref: '#/components/examples/Data_views_set_default_data_view_response'
schema:
type: object
properties:
acknowledged:
type: boolean
description: Indicates a successful call.
'400':
content:
application/json:
examples:
setDefaultDataViewBadRequest:
$ref: '#/components/examples/Data_views_error_400_response'
schema:
$ref: '#/components/schemas/Data_views_400_response'
description: Bad request
summary: Set the default data view
tags:
- data views
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/data_views/default\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"data_view_id\":\"ff959d40-b880-11e8-a6d9-e546fe2bba5f\",\"force\":true}'\n"
- lang: Console
source: 'POST kbn://api/data_views/default
{"data_view_id":"ff959d40-b880-11e8-a6d9-e546fe2bba5f","force":true}
'
x-metaTags:
- content: Kibana
name: product_name
/api/data_views/swap_references:
post:
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/data_views/swap_references</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Swap saved object references from one data view to another. Use this endpoint to update dashboards, visualizations, and other saved obj
# --- truncated at 32 KB (96 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kibana/refs/heads/main/openapi/kibana-data-views-api-openapi.yml