Delete documents by criteria
This service provides a way for the user to delete documents matching any criteria, returning the count of documents deleted afterwards.
Service description
Service | Description | ||
---|---|---|---|
delete |
Deletes documents based on RSQL criteria. |
||
Parameter |
Type |
Description |
|
query |
<rsql query> |
An RSQL expression with the criteria of the documents to be deleted. |
|
Returns |
Type |
Description |
|
removeDocumentsResult |
RemoveDocumentsResult |
A response object containing the number of documents deleted. |
Usage
Example of a call the requests finished documents created of modified before 2021-01-01 (query: createdDate=lt=2020-01-01 or modifiedDate=lt=2020-01-01)
curl -X DELETE "https://esign.celfocus.com/eSignServer/rest/v1/document/delete?query=createdDate%3Dlt%3D2021-01-01%20or%20modifiedDate%3Dlt%3D2021-01-01" -H "accept: application/json"
{
"Data": 1459,
"Errors": null,
"Warnings": null
}
Configuration
The configurations described in the following table allow for the customization of the purge service.
Name | Default Value | Description |
---|---|---|
artifact.purge.deleteSignatures |
false |
A flag that determines if the signatures associated with the documents should also be deleted. |
artifact.purge.service.bulk |
2000 |
The number of documents that are deleted on each database access. This is done to reduce the impact on the system’s performance and prevent unexpected issues like memory issues (Millions of documents being loaded at once to be worked on). |
{
"properties":{
...
"artifact.purge.deleteSignatures": false,
"artifact.purge.service.bulk": 2000
...
}
}