kibana/docs/api/saved-objects.asciidoc

35 lines
1.3 KiB
Plaintext
Raw Normal View History

[[saved-objects-api]]
== Saved Objects API
The saved objects API allows people to manage Kibana saved objects, including
but not limited to dashboards, visualizations, and index patterns.
Traditionally, developers would perform this level of integration by writing
documents directly to the `.kibana` index. *Do not do this!* Writing directly
to the `.kibana` index is not safe and it _will_ result in corrupted data that
permanently breaks Kibana in a future version.
NOTE: You cannot access these endpoints via the Console in Kibana.
* <<saved-objects-api-get>>
* <<saved-objects-api-bulk-get>>
* <<saved-objects-api-find>>
* <<saved-objects-api-create>>
* <<saved-objects-api-bulk-create>>
* <<saved-objects-api-update>>
* <<saved-objects-api-delete>>
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
* <<saved-objects-api-export>>
* <<saved-objects-api-import>>
* <<saved-objects-api-resolve-import-conflicts>>
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_conflicts.asciidoc[]