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:
Argument | Description | Required |
---|---|---|
dbApiKy |
String with database id. |
Yes. |
token |
String with user token or database Master key. |
No. |
collectionName |
String with name of collection. |
Yes. |
queryString |
JSON 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});