This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Removes a number of items from a collection.
The bulkRemove()
method returns a Promise that resolves after the items have been removed from the specified collection. The Promise is rejected if the current user does not have "delete" permissions for the collection. If the delete permissions for the collection are assigned to Item's creator, the only items that are deleted are those for which the current user is the owner. All other items are skipped.
Calling the bulkRemove()
method triggers the beforeRemove()
and afterRemove()
hooks for each item that is deleted if the hooks have been defined.
Notes:
bulkRemove()
method also clears multiple-item reference fields
for items in collections referenced by the specified items. For example,
suppose you have a Movies collection with an Actors field that
contains multiple references to items in a People collection.
Removing items in the Movies collection also clears the data in the
corresponding multiple-item reference fields in the People collection.
ID of the collection to which the items belong.
IDs of the items to remove. The array must contain at least one item. Passing an empty array returns an error.
Options to use when processing this operation.