DELETE /api/dms/objects

As of Versionproduct version 2021 Winter | component version 2021 Winter
Request MethodDELETE
Response FormatHTTP status code
Required Permissionaction delete and read
>> Roles and Role Sets
Description

Deletes multiple objects specified by ID in the JSON request body.

A delete permission is required for all objects. A folder cannot be deleted if it is not empty (see DELETE /api/dms/objects/{objectId}).
If the object for at least one ID cannot be found or cannot be deleted, the whole request fails.

The number of objects that can be deleted simultaneously via this endpoint is limited to 100.

All old versions of the referred objects are deleted as well.

The assigned binary content files are only deleted from the repository if no other object or object version refers to them.

In the audit trail, the entries 202 and 200 are created for each deleted object. All previous audit entries for the deleted objects remain in the database and can still be retrieved via search.

If other properties beside system:objectId are specified in the request body, they are ignored. Especially, the result list of a search response can thus directly be sent as request body to delete all included objects.

Request HeaderContent-Type: application/json
Request Example

The object IDs of the objects to be deleted are passed in the request body in JSON format.

{
	"objects": [{
		"properties": {
			"system:objectId": {
				"value": "cdc7095f-a5ce-486d-92a7-6d0955d969ee"
			}
		}
	},
	{
		"properties": {
			"system:objectId": {
				"value": "cdc7106f-a5ce-597d-92a7-1d1166d171ee"
			}
		}
	}]
}

Result Example

no result

Response
Meaning of the response status codes:

200 OK

All DMS objects were deleted.

403 Forbidden

Insufficient permissions for at least one object.

404 Not Found

At least one of the specified objects cannot be found.

409 Conflict

At least one of the specified objects cannot be deleted due to retention (for more details click here).