Deleting Containers

All objects within a container must first be deleted before the container can be deleted. To find out whether a container contains any objects, use a HEAD request.

  • For information about deleting containers by using the REST API, see Delete Container in OpenStack Object Storage Service API Reference.

    cURL command syntax:

    curl -v -X DELETE -H 'X-Auth-Token: token' accountURL/containerName

    cURL command example:

    curl -v -X DELETE -H 'X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b' https://storage.us2.oraclecloud.com/v1/Storage-ORACLEGENZ138479113098/myFirstContainer

  • For information about deleting containers by using the Java library, see deleteContainer in Java API Reference for Oracle Cloud Storage Service.