< Previous | Contents | Next >

4.4.3 Deleting Versions

image

If you delete an object from a namespace with versioning enabled, HCP will retain the object as a historic version. HCP requires you to use the purge feature to delete all versions of an object from a namespace.


NOTE


You cannot delete individual historic versions of an object. You can only purge them. When an object is purged from a repository, all its historic versions are deleted.

NOTE


You cannot delete individual historic versions of an object. You can only purge them. When an object is purged from a repository, all its historic versions are deleted.


Purging an object is similar to deleting one. Let’s modify the program in Section 2.3 to purge the object

examples/world.txt from the HCP namespace Ns01.

String url = http://ns01.tn01.hcp01.hitachi.com/rest/examples/world.txt?" + "purge-true”;


The DELETE method is used to purge an object. The argument purge explicitly asks for the object to be purged from the repository. It is specified in-line as a URL parameter.


If an object is on legal hold or under retention, a privileged purge is required to purge the object from the repository. Privileged purges are described in greater depth in Section 3.4: Retaining Objects.