kibana/docs/development/core/server/kibana-plugin-server.savedobjectsclient.md
Rudolf Meijering 5a13a20076
Split legacy plugin discovery, expose SavedObjects scopedClient, wrappers, repository (#48882) (#51978)
* Split legacy plugin discovery, expose internal SavedObjectsClient

* Expose internal SavedObjectsClient to plugins

* Add more documentation

* Expose client wrappers, repository, scoped client from SavedObjects

* Remove unused onBeforeWrite

* Refactor Service / Repository for testability

* Bind exposed clientProvider methods

* Fix eArchiver's KibanaMigrator

* Cleanup

* Use APICaller type

* Expose SavedObjectsServiceStart to plugins

* API documentation

* Rename API methods to be verbs
2019-12-02 18:45:07 +01:00

2 KiB

Home > kibana-plugin-server > SavedObjectsClient

SavedObjectsClient class

Signature:

export declare class SavedObjectsClient 

Properties

Property Modifiers Type Description
errors typeof SavedObjectsErrorHelpers
errors static typeof SavedObjectsErrorHelpers

Methods

Method Modifiers Description
bulkCreate(objects, options) Persists multiple documents batched together as a single request
bulkGet(objects, options) Returns an array of objects by id
bulkUpdate(objects, options) Bulk Updates multiple SavedObject at once
create(type, attributes, options) Persists a SavedObject
delete(type, id, options) Deletes a SavedObject
find(options) Find all SavedObjects matching the search query
get(type, id, options) Retrieves a single object
update(type, id, attributes, options) Updates an SavedObject

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the SavedObjectsClient class.