You can delete objects in one of two ways:
To delete by primary key, include the key as the last URL node, and include the checksum, as shown below:
The checksum value may be specified as 'override' so the resulting URL would be
This not generally recommended as it bypasses optimistic locking, but can be very useful when reloading data.
The optional parameter 'ignoredeleted' can be added to control the response when the resource is not found. Normally, a DELETE on a non-existent resource results in a 404 - No such object error message. While this is correctly 'RESTful' and idempotent, it may not be the wanted result. For these times, 'ignoredeleted' parameter may be added. The call will still be idempotent, but will return 200 with an empty txsummary.
This may be useful in data loading scenarios where old data (which may or may not exist) is to be deleted. The cURL utility, has a '--fail' switch which returns an error level 22 when most 400 and 500 errors are encountered. Use of the 'ignoredeleted' flag can make batch jobs simpler.
will return error level 0 when it successfully deletes AND when it does not exist. It will return usually return 22 for other errors.
Deleting objects one at a time can be too slow. To delete multiple objects in one request, you can send those objects (actually, just their metadata section is required) with the
Specifying the entire objects instead of just the metadata section does not hurt anything, it's just not required.