Retrieve Deleted Document IDs
Retrieve IDs of documents deleted within the past 30 days.
After documents and document versions are deleted, their IDs remain available for retrieval for 30 days. After that, they cannot be retrieved. This request supports optional parameters to narrow the results to a specific date and time range within the past 30 days.
To completely restore a document deleted within the last 30 days, contact Veeva support.
/api/{version}/objects/deletions/documentsHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json or text/csv |
Accept | application/json (default) or application/xml or text/csv |
Query Parameters
Section link for Query ParametersYou can modify the request by using one or both of the following parameters:
| Name | Description |
|---|---|
start_date | Specify a date (no more than 30 days past) after which Vault will look for deleted documents. Dates must be YYYY-MM-DDTHH:MM:SSZ format, for example, 7AM on January 15, 2016 would use 2016-01-15T07:00:00Z |
end_date | Specify a date (no more than 30 days past) before which Vault will look for deleted documents. Dates must be YYYY-MM-DDTHH:MM:SSZ format, for example, 7AM on January 15, 2016 would use 2016-01-15T07:00:00Z |
Dates and times are in UTC. If the time is not specified, it will default to midnight (T00:00:00Z) on the specified date.
Request
Section link for Requestcurl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/v20.2/objects/deletions/documentsResponse (abridged)
Section link for Response (abridged){
"responseStatus": "SUCCESS",
"responseMessage": "OK",
"responseDetails": {
"limit": 1000,
"size": 88,
"offset": 0,
"total": 88
},
"data": [
{
"id": 690,
"major_version_number__v": 0,
"minor_version_number__v": 1,
"date_deleted": "2016-02-10T00:29:45Z"
},
{
"id": 690,
"major_version_number__v": 0,
"minor_version_number__v": 2,
"date_deleted": "2016-02-10T00:29:45Z"
},
{
"id": 691,
"major_version_number__v": 0,
"minor_version_number__v": 1,
"date_deleted": "2016-02-10T23:46:07Z"
},
{
"id": 692,
"major_version_number__v": 0,
"minor_version_number__v": 1,
"date_deleted": "2016-02-10T00:29:37Z"
}
]
}Response Details
Section link for Response DetailsThe abridged response shows that a total of 88 documents were deleted from this Vault in the past 30 days. Two versions (0.1 and 0.2) were deleted for Document ID 690. Version 0.1 was deleted for both Document ID 691 and Document ID 692. The response includes the date and time when each document was deleted. Date and time display in UTC, not in the user's time zone.