Saved Objects
Saved Objects allow Kibana plugins to use Elasticsearch like a primary database. Think of them as an Object Document Mapper for Elasticsearch. Once a plugin has registered one or more Saved Object types, the Saved Objects client can be used to query or perform create, read, update and delete operations on each type.
Terminology: A Saved Object type is the schema and configuration that a plugin registers for a kind of document (name, mappings, model versions, etc.). Saved Objects are the document instances of that type stored in Elasticsearch. The sections below cover both how to define and evolve Saved Object types and how to perform CRUD on Saved Object instances via the Core service (see Use).
The Saved Objects service is available on server side. Client side services and APIs have been deprecated for some time and will be removed in the near future.
By using Saved Objects your plugin can take advantage of the following features:
- Migrations can evolve your document's schema by transforming documents and ensuring that the field mappings on the index are always up to date.
- a HTTP API is automatically exposed for each type (unless
hidden=trueis specified). - a Saved Objects client that can be used from both the server and the browser.
- Users can import or export Saved Objects using the Saved Objects management UI or the Saved Objects import/export API.
- By declaring
references, an object's entire reference graph will be exported. This makes it easy for users to export e.g. adashboardobject and have all thevisualizationobjects required to display the dashboard included in the export. - When the X-Pack security and spaces plugins are enabled these transparently provide RBAC access control and the ability to organize Saved Objects into spaces.
This documentation is organized into the following sections:
- Structure — Parts of a Saved Object type definition (name, index pattern, mappings, model versions) and the structure of a model version.
- Create — Register a new Saved Object type, define mappings and references, and define the initial model version.
- Use — Perform CRUD on Saved Object instances via the Core service (create, get, find, update, delete). Do not use the deprecated HTTP API.
- Update — Upgrade existing Saved Object types (legacy transition and new model versions).
- Validate — Test model versions, ensure safe type definition changes, and troubleshoot validation failures.
- Delete — Remove a Saved Object type registration.
- Share — Sharing saved objects across spaces (namespace types, conversion, deep links, legacy URL aliases).
- Migrations — How type schema and mapping changes are rolled out on Classic stack and Serverless.