kibana/docs/api/saved-objects.asciidoc

47 lines
2.2 KiB
Plaintext
Raw Normal View History

[[saved-objects-api]]
== Saved objects APIs
Manage {kib} saved objects, including dashboards, visualizations, index patterns, and more.
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 {kib} versions.
The following saved objects APIs are available:
* <<saved-objects-api-get, Get object API>> to retrieve a single {kib} saved object by ID
* <<saved-objects-api-resolve, Resolve object API>> to retrieve a single {kib} saved object by ID, using any legacy URL alias if it exists
* <<saved-objects-api-bulk-get, Bulk get objects API>> to retrieve multiple {kib} saved objects by ID
* <<saved-objects-api-find, Find objects API>> to retrieve a paginated set of {kib} saved objects by various conditions
* <<saved-objects-api-create, Create saved object API>> to create {kib} saved objects
* <<saved-objects-api-bulk-create, Bulk create saved objects API>> to create multiple {kib} saved objects
* <<saved-objects-api-update, Update object API>> to update the attributes for existing {kib} saved objects
* <<saved-objects-api-delete, Delete object API>> to remove {kib} saved objects
* <<saved-objects-api-export, Export objects API>> to retrieve sets of saved objects that you want to import into {kib}
* <<saved-objects-api-import, Import objects API>> to create sets of {kib} saved objects from a file created by the export API
* <<saved-objects-api-resolve-import-errors, Resolve import errors API>> to resolve errors from the import API
* <<saved-objects-api-rotate-encryption-key, Rotate encryption key API>> to rotate the encryption key for encrypted saved objects
include::saved-objects/get.asciidoc[]
include::saved-objects/bulk_get.asciidoc[]
include::saved-objects/find.asciidoc[]
include::saved-objects/create.asciidoc[]
include::saved-objects/bulk_create.asciidoc[]
include::saved-objects/update.asciidoc[]
include::saved-objects/delete.asciidoc[]
Basic server side export API for saved objects (#30326) * Initial work for new server side export API * Revert UI changes, API only in this PR * Remove whitespace at top of export.asciidoc * Add tests around limitations * Add comment * Convert some files to typescript * Move Boom.boomify to where the errors are created * Use Boom.badRequest for now * Fix lint issue * Move files * Update tests * Add functional test * Export all documents by default * Update test assertions * Use ~10000 saved objects in export api integration test * Convert route to typescript, add content-type response header * Move some tests to api_integration * Use new sort and rename functions/variables * Move tests to API integration * Cleanup and finalize api integration tests * Make type or objects required but not both in the same call * Add spaces / security tests * Add noTypeOrObjects to security / spaces tests * Use json-stable-stringify and add tests for export ordering * Address self feedback, add without kibana index test * Only allow export API to export index-pattern, dashboard, visualization and search type objects * Make import export size configurable and fix broken tests * Fix broken tests * Move test config to mock server * Add more typescript types instead of using any * Convert request from GET to POST * Fix saved objects mixin test * Update src/legacy/server/saved_objects/lib/export.ts Co-Authored-By: mikecote <mikecote@users.noreply.github.com> * Apply PR feedback * Fix lint error * Update test snapshots due to jest upgrade * Add error handling for bulkGet * Split export API into two endpoints * Update src/legacy/server/saved_objects/routes/export_by_type.test.ts Co-Authored-By: mikecote <mikecote@users.noreply.github.com> * Update docs/api/saved-objects/export_by_type.asciidoc Co-Authored-By: mikecote <mikecote@users.noreply.github.com> * Update docs/api/saved-objects/export_by_type.asciidoc Co-Authored-By: mikecote <mikecote@users.noreply.github.com> * Update src/legacy/server/saved_objects/routes/export_objects.test.ts Co-Authored-By: mikecote <mikecote@users.noreply.github.com> * Apply PR feedback * MockServer -> createMockServer * Revert back to single API * Re-apply PR feedback
2019-03-05 21:42:02 +01:00
include::saved-objects/export.asciidoc[]
include::saved-objects/import.asciidoc[]
include::saved-objects/resolve_import_errors.asciidoc[]
include::saved-objects/resolve.asciidoc[]
include::saved-objects/rotate_encryption_key.asciidoc[]