Skip to content

Opensearch dashboards.savedobjectsrepository

Home > opensearch-dashboards > SavedObjectsRepository

SavedObjectsRepository class

Signature:

export declare class SavedObjectsRepository 

Methods

Method Modifiers Description
addToNamespaces(type, id, namespaces, options) Adds one or more namespaces to a given multi-namespace saved object. This method and [deleteFromNamespaces]SavedObjectsRepository.deleteFromNamespaces() are the only ways to change which Spaces a multi-namespace saved object is shared to.
bulkCreate(objects, options) Creates multiple documents at once
bulkGet(objects, options) Returns an array of objects by id
bulkUpdate(objects, options) Updates multiple objects in bulk
checkConflicts(objects, options) Check what conflicts will result when creating a given array of saved objects. This includes "unresolvable conflicts", which are multi-namespace objects that exist in a different namespace; such conflicts cannot be resolved/overwritten.
create(type, attributes, options) Persists an object
delete(type, id, options) Deletes an object
deleteByNamespace(namespace, options) Deletes all objects from the provided namespace.
deleteFromNamespaces(type, id, namespaces, options) Removes one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted entirely. This method and [addToNamespaces]SavedObjectsRepository.addToNamespaces() are the only ways to change which Spaces a multi-namespace saved object is shared to.
find(options)
get(type, id, options) Gets a single object
incrementCounter(type, id, counterFieldName, options) Increases a counter field by one. Creates the document if one doesn't exist for the given id.
update(type, id, attributes, options) Updates an object