Delete Objects
The following SDK method can be used to delete multiple objects from the bucket.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
objects | ArrayList<ZCatalystObject> | An array containing the list of objects (and version IDs, if Versioning is enabled for the bucket) that needs to be deleted. |
Note: If the SDK method is used without the objects parameter, then all the objects in the bucket will be deleted.
copy
try {
ZCatalystBucket bucket = stratus.bucket("testing");
var (response, objects, _) = await bucket.getObjects(maxKeys: 5, prefix: 'trip');
var response = await bucket.deleteObjects(objects);
print("Delete Objects: ${response.statusCode}");
}
on ZCatalystException catch (ex) {
print(ex.toString());
}
Last Updated 2025-08-28 12:01:44 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit