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 saved objects 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:
- name: saved objects
x-displayName: Saved objects
description: 'Export sets of saved objects that you want to import into Kibana, resolve import errors, and rotate an encryption key for encrypted saved objects with the saved objects APIs.
To manage a specific type of saved object, use the corresponding APIs.
For example, use:
* [Data views](../group/endpoint-data-views)
* [Spaces](../group/endpoint-spaces)
* [Short URLs](../group/endpoint-short-url)
Warning: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future Kibana versions.
'
paths:
/api/encrypted_saved_objects/_rotate_key:
post:
description: 'Superuser role required.
If a saved object cannot be decrypted using the primary encryption key, then Kibana will attempt to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you''re dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key.
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
'
operationId: rotateEncryptionKey
parameters:
- description: 'Specifies a maximum number of saved objects that Kibana can process in a single batch. Bulk key rotation is an iterative process since Kibana may not be able to fetch and process all required saved objects in one go and splits processing into consequent batches. By default, the batch size is 10000, which is also a maximum allowed value.
'
in: query
name: batch_size
required: false
schema:
default: 10000
type: number
- description: 'Limits encryption key rotation only to the saved objects with the specified type. By default, Kibana tries to rotate the encryption key for all saved object types that may contain encrypted attributes.
'
in: query
name: type
required: false
schema:
type: string
responses:
'200':
content:
application/json:
examples:
rotateEncryptionKeyResponse:
$ref: '#/components/examples/Saved_objects_key_rotation_response'
schema:
type: object
properties:
failed:
description: 'Indicates the number of the saved objects that were still encrypted with one of the old encryption keys that Kibana failed to re-encrypt with the primary key.
'
type: number
successful:
description: 'Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.
NOTE: In most cases, `total` will be greater than `successful` even if `failed` is zero. The reason is that Kibana may not need or may not be able to rotate encryption keys for all encrypted saved objects.
'
type: number
total:
description: 'Indicates the total number of all encrypted saved objects (optionally filtered by the requested `type`), regardless of the key Kibana used for encryption.
'
type: number
description: Indicates a successful call.
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Saved_objects_400_response'
description: Bad request
'429':
content:
application/json:
schema:
type: object
description: Already in progress.
summary: Rotate a key for encrypted saved objects
tags:
- saved objects
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_bulk_create:
post:
deprecated: true
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/saved_objects/_bulk_create</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
Creates multiple Kibana saved objects in a single request.
For transferring or backing up saved objects, prefer the import and export APIs (`POST /api/saved_objects/_import` and `POST /api/saved_objects/_export`).'
operationId: post-saved-objects-bulk-create
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
- description: Overwrite existing saved objects that match the same type and ID.
in: query
name: overwrite
required: false
schema:
default: false
type: boolean
requestBody:
content:
application/json:
examples:
bulkCreateRequest:
summary: Create multiple saved objects (partial success)
value:
- attributes:
title: Example dashboard 1
id: example-dashboard-1
references: []
type: dashboard
- attributes:
title: Example dashboard 2
id: example-dashboard-2
references: []
type: dashboard
schema:
items:
additionalProperties: false
type: object
properties:
attributes:
additionalProperties:
nullable: true
type: object
coreMigrationVersion:
type: string
id:
type: string
initialNamespaces:
items:
type: string
maxItems: 100
minItems: 1
type: array
migrationVersion:
additionalProperties:
type: string
type: object
references:
items:
additionalProperties: false
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
required:
- name
- type
- id
maxItems: 1000
type: array
type:
type: string
typeMigrationVersion:
type: string
version:
type: string
required:
- type
- attributes
maxItems: 10000
type: array
responses:
'200':
content:
application/json:
examples:
bulkCreateResponse:
summary: A bulk create response with one conflict
value:
saved_objects:
- attributes:
title: Example dashboard 1
id: example-dashboard-1
managed: false
namespaces:
- default
references: []
type: dashboard
updated_at: '2026-04-17T12:00:00.000Z'
version: WzEsMV0=
- error:
error: Conflict
message: Saved object [dashboard/example-dashboard-2] conflict
statusCode: 409
id: example-dashboard-2
type: dashboard
description: A bulk create response.
'400':
content:
application/json:
examples:
badRequestResponse:
summary: A bad request error
value:
error: Bad Request
message: 'Unsupported saved object type(s): unknownType'
statusCode: 400
description: A bad request.
summary: Create saved objects
tags:
- saved objects
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/saved_objects/_bulk_create?overwrite=false\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '[{\"type\":\"dashboard\",\"id\":\"example-dashboard-1\",\"attributes\":{\"title\":\"Example dashboard 1\"},\"references\":[]},{\"type\":\"dashboard\",\"id\":\"example-dashboard-2\",\"attributes\":{\"title\":\"Example dashboard 2\"},\"references\":[]}]'\n"
- lang: Console
source: 'POST kbn://api/saved_objects/_bulk_create?overwrite=false
[{"type":"dashboard","id":"example-dashboard-1","attributes":{"title":"Example dashboard 1"},"references":[]},{"type":"dashboard","id":"example-dashboard-2","attributes":{"title":"Example dashboard 2"},"references":[]}]
'
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_bulk_delete:
post:
deprecated: true
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/saved_objects/_bulk_delete</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
Deletes multiple Kibana saved objects in a single request.
There is currently no complete replacement for deleting arbitrary saved objects via an HTTP API.'
operationId: post-saved-objects-bulk-delete
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
- description: When true, force deletion of multi-namespace objects from all namespaces.
in: query
name: force
required: false
schema:
type: boolean
requestBody:
content:
application/json:
examples:
bulkDeleteRequest:
summary: Delete multiple saved objects
value:
- id: example-dashboard-1
type: dashboard
- id: does-not-exist
type: dashboard
schema:
items:
additionalProperties: false
type: object
properties:
id:
type: string
type:
type: string
required:
- type
- id
maxItems: 10000
type: array
responses:
'200':
content:
application/json:
examples:
bulkDeleteResponse:
summary: A bulk delete response with one not found result
value:
statuses:
- id: example-dashboard-1
success: true
type: dashboard
- error:
error: Not Found
message: Saved object [dashboard/does-not-exist] not found
statusCode: 404
id: does-not-exist
success: false
type: dashboard
description: A bulk delete response.
'400':
content:
application/json:
examples:
badRequestResponse:
summary: A bad request error
value:
error: Bad Request
message: 'Unsupported saved object type(s): unknownType'
statusCode: 400
description: A bad request.
summary: Delete saved objects
tags:
- saved objects
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/saved_objects/_bulk_delete?force=false\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '[{\"type\":\"dashboard\",\"id\":\"example-dashboard-1\"},{\"type\":\"dashboard\",\"id\":\"does-not-exist\"}]'\n"
- lang: Console
source: 'POST kbn://api/saved_objects/_bulk_delete?force=false
[{"type":"dashboard","id":"example-dashboard-1"},{"type":"dashboard","id":"does-not-exist"}]
'
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_bulk_get:
post:
deprecated: true
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/saved_objects/_bulk_get</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
Retrieves multiple Kibana saved objects by type and ID in a single request.
For transferring or backing up saved objects, prefer the export API (`POST /api/saved_objects/_export`).'
operationId: post-saved-objects-bulk-get
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
requestBody:
content:
application/json:
examples:
bulkGetRequest:
summary: Get multiple saved objects
value:
- id: example-dashboard-1
type: dashboard
- id: does-not-exist
type: dashboard
schema:
items:
additionalProperties: false
type: object
properties:
fields:
items:
type: string
maxItems: 100
type: array
id:
type: string
namespaces:
items:
type: string
maxItems: 100
type: array
type:
type: string
required:
- type
- id
maxItems: 10000
type: array
responses:
'200':
content:
application/json:
examples:
bulkGetResponse:
summary: A bulk get response with one not found result
value:
saved_objects:
- attributes:
title: Example dashboard 1
id: example-dashboard-1
managed: false
namespaces:
- default
references: []
type: dashboard
updated_at: '2026-04-17T12:00:00.000Z'
version: WzEsMV0=
- error:
error: Not Found
message: Saved object [dashboard/does-not-exist] not found
statusCode: 404
id: does-not-exist
type: dashboard
description: A bulk get response.
'400':
content:
application/json:
examples:
badRequestResponse:
summary: A bad request error
value:
error: Bad Request
message: 'Unsupported saved object type(s): unknownType'
statusCode: 400
description: A bad request.
summary: Get saved objects
tags:
- saved objects
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/saved_objects/_bulk_get\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '[{\"type\":\"dashboard\",\"id\":\"example-dashboard-1\"},{\"type\":\"dashboard\",\"id\":\"does-not-exist\"}]'\n"
- lang: Console
source: 'POST kbn://api/saved_objects/_bulk_get
[{"type":"dashboard","id":"example-dashboard-1"},{"type":"dashboard","id":"does-not-exist"}]
'
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_bulk_resolve:
post:
deprecated: true
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb post">post</span> <span class="operation-path">/s/{space_id}/api/saved_objects/_bulk_resolve</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
Retrieve multiple Kibana saved objects by ID, using any legacy URL aliases if they exist.
Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object''s ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved with the bulk resolve API using either its new ID or its old ID.'
operationId: post-saved-objects-bulk-resolve
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
requestBody:
content:
application/json:
examples:
bulkResolveRequest:
summary: Resolve multiple saved objects
value:
- id: example-dashboard-1
type: dashboard
- id: legacy-id
type: dashboard
schema:
items:
additionalProperties: false
type: object
properties:
id:
type: string
type:
type: string
required:
- type
- id
maxItems: 10000
type: array
responses:
'200':
content:
application/json:
examples:
bulkResolveResponse:
summary: A bulk resolve response with an exact and alias match
value:
resolved_objects:
- outcome: exactMatch
saved_object:
attributes:
title: Example dashboard 1
id: example-dashboard-1
managed: false
namespaces:
- default
references: []
type: dashboard
updated_at: '2026-04-17T12:00:00.000Z'
version: WzEsMV0=
- alias_target_id: example-dashboard-2
outcome: aliasMatch
saved_object:
attributes:
title: Example dashboard 2
id: example-dashboard-2
managed: false
namespaces:
- default
references: []
type: dashboard
updated_at: '2026-04-17T12:00:00.000Z'
version: WzEsMl0=
description: A bulk resolve response.
'400':
content:
application/json:
examples:
badRequestResponse:
summary: A bad request error
value:
error: Bad Request
message: 'Unsupported saved object type(s): unknownType'
statusCode: 400
description: A bad request.
summary: Resolve saved objects
tags:
- saved objects
x-codeSamples:
- lang: curl
source: "curl \\\n -X POST \"${KIBANA_URL}/api/saved_objects/_bulk_resolve\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '[{\"type\":\"dashboard\",\"id\":\"example-dashboard-1\"},{\"type\":\"dashboard\",\"id\":\"legacy-id\"}]'\n"
- lang: Console
source: 'POST kbn://api/saved_objects/_bulk_resolve
[{"type":"dashboard","id":"example-dashboard-1"},{"type":"dashboard","id":"legacy-id"}]
'
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_bulk_update:
put:
deprecated: true
description: '**Spaces method and path for this operation:**
<div><span class="operation-verb put">put</span> <span class="operation-path">/s/{space_id}/api/saved_objects/_bulk_update</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
WARNING: This API is deprecated. This is a legacy Saved Objects API and may be removed in a future version of Kibana.
Updates multiple Kibana saved objects in a single request.
For transferring or backing up saved objects, prefer the import and export APIs (`POST /api/saved_objects/_import` and `POST /api/saved_objects/_export`).'
operationId: put-saved-objects-bulk-update
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
requestBody:
content:
application/json:
examples:
bulkUpdateRequest:
summary: Update multiple saved objects (partial success)
value:
- attributes:
title: Updated dashboard title
id: example-dashboard-1
references: []
type: dashboard
- attributes:
title: Updated dashboard title
id: does-not-exist
type: dashboard
schema:
items:
additionalProperties: false
type: object
properties:
attributes:
additionalProperties:
nullable: true
type: object
id:
type: string
namespace:
minLength: 1
type: string
references:
items:
additionalProperties: false
type: object
properties:
id:
type: string
name:
type: string
type:
type: string
required:
- name
- type
- id
maxItems: 1000
type: array
type:
type: string
version:
type: string
required:
- type
- id
- attributes
maxItems: 10000
type: array
responses:
'200':
content:
application/json:
examples:
bulkUpdateResponse:
summary: A bulk update response with one not found result
value:
saved_objects:
- attributes:
title: Updated dashboard title
id: example-dashboard-1
managed: false
namespaces:
- default
references: []
type: dashboard
updated_at: '2026-04-17T12:00:00.000Z'
version: WzIsMV0=
- error:
error: Not Found
message: Saved object [dashboard/does-not-exist] not found
statusCode: 404
id: does-not-exist
type: dashboard
description: A bulk update response.
'400':
content:
application/json:
examples:
badRequestResponse:
summary: A bad request error
value:
error: Bad Request
message: 'Unsupported saved object type(s): unknownType'
statusCode: 400
description: A bad request.
summary: Update saved objects
tags:
- saved objects
x-codeSamples:
- lang: curl
source: "curl \\\n -X PUT \"${KIBANA_URL}/api/saved_objects/_bulk_update\" \\\n -H \"Authorization: ApiKey ${API_KEY}\" \\\n -H \"kbn-xsrf: true\" \\\n -H \"Content-Type: application/json\" \\\n -d '[{\"type\":\"dashboard\",\"id\":\"example-dashboard-1\",\"attributes\":{\"title\":\"Updated dashboard title\"},\"references\":[]},{\"type\":\"dashboard\",\"id\":\"does-not-exist\",\"attributes\":{\"title\":\"Updated dashboard title\"}}]'\n"
- lang: Console
source: 'PUT kbn://api/saved_objects/_bulk_update
[{"type":"dashboard","id":"example-dashboard-1","attributes":{"title":"Updated dashboard title"},"references":[]},{"type":"dashboard","id":"does-not-exist","attributes":{"title":"Updated dashboard title"}}]
'
x-metaTags:
- content: Kibana
name: product_name
/api/saved_objects/_export:
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/saved_objects/_export</span></div>
Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. The output of exporting saved objects must be treated as opaque. Tampering with exported data risks introducing unspecified errors and data loss.
Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.
NOTE: The exported saved objects include `coreMigrationVersion` and `typeMigrationVersion` metadata. If you store exported saved objects outside of Kibana (for example in NDJSON files) or generate them yourself, you must preserve or include these fields to retain forward compatibility across Kibana versions.
NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.'
operationId: post-saved-objects-export
parameters:
- description: A required header to protect against CSRF attacks
in: header
name: kbn-xsrf
required: true
schema:
example: 'true'
type: string
requestBody:
content:
application/json:
examples:
exportSavedObjectsRequest:
summary: Export a specific saved object
value:
excludeExportDetails: true
includeReferencesDeep: false
objects:
- id: example-dashboard-1
type: dashboard
schema:
additionalProperties: false
type: object
properties:
excludeExportDetails:
default: false
description: Do not add export details entry at the end of the stream.
type: boolean
hasReference:
anyOf:
- additionalProperties: false
type: object
properties:
id:
type: string
type:
type: string
required:
- type
- id
- items:
additionalProperties: false
type: object
properties:
id:
type: string
type:
type: string
required:
- type
# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kibana/refs/heads/main/openapi/kibana-saved-objects-api-openapi.yml