Delete an Object From a Bucket

To delete an object from the bucket:

  1. Select the required object.

    catalyst_stratus_object_options
  2. Click Delete.

    catalyst_stratus_delete_op_hilit
  3. Click Delete in the prompt as well.

    catalyst_stratus_del_object_confirm_del

The delete action will be scheduled, and it will take a short while before the operation is rendered in the console.

Delete operations can be performed on multiple objects and on multiple paths in the same manner.

You can also use the Delete button present in the object details view to delete the object.

catalyst_stratus_delete_ins_op_confirm
Note: Visit this help document for more information on this SDK method.

Ensure the following packages are imported:

    
copy

import org.json.simple.JSONObject;

    
copy

int ttl = 200; JSONObject deleteRes = bucket.deleteObject(“objectName”, “versionId”, ttl); System.out.println(deleteRes);

Note: Visit this help document for more information on this SDK method.
    
copy

const res = await bucket.deleteObject(“objectName”); console.log(res);

Note: Visit this help document for more information on this SDK method.
    
copy

delete_res = bucket.delete_object(‘object_name’) print(delete_res)

Note: Visit this help document for more information on this SDK method.
    
copy

// Delete an object const deleteObject = await bucket.deleteObject(“objectName”);

Note: Visit this help document for more information on this SDK method.
    
copy

objectInstance.delete() { error in if let error = error { print(“Error : \( error )”) return } print(“Deleted Successfully”) }

Note: Visit this help document for more information on this SDK method.
    
copy

bucketInstance.getObject(“SunSet.jpeg”, “2823000000044005”, //Replace this with your Object Name and Object ID { object -> object.delete( { println(“Object Deletion Success.”) }, { println(“Failed to delete the object. $it”) } )

Note: Visit this help document for more information on this SDK method.
    
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()); }

Note: When you perform a delete operation on an object, and if it is the only object present in the particular path, then the entire path will be deleted. An empty path cannot exist in a bucket.

Last Updated 2025-06-03 18:19:55 +0530 +0530