multiDeleteObject

Collection.multiDeleteObject(dbApiKey, collectionName, queryString[, token])

Deletes multiple objects from a specified collection that matches specified criteria (queryString). The method will return a 200 status code on successful delete and empty body.

Parameters

The method has the following parameters:

ArgumentDescriptionRequired
dbApiKyString with database id.Yes.
tokenString with user token or database Master key.No.
collectionNameString with name of collection.Yes.
queryStringJSON query object that was built in accordance with the MongoDB querying documentation.Yes.
Example

This example will delete all objects where isTransferStudent is set to false.

var dbApiKey = "c33010af-f263-4443-9897-c2ffaf522956";
var result = Collection.multiDeleteObject(dbApiKey, "Student", {isTransferStudent: false});