Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Get a List of Deleted Records Within a Given Timeframe
Use the sObject Get Deleted resource to get a list of deleted
records for the specified object. Specify the date and time range within which the
records for the given object were deleted. Deleted records are written to a delete log
(that is periodically purged), and will be filtered out of most operations, such as
sObject Rows or Query (although QueryAll will include deleted records in
results).
Example usage for getting a list of Merchandise__c records that were deleted between May 5th, 2013 and May 10th, 2013
1curl https://MyDomainName.my/services/data/v67.0/sobjects/Merchandise__c/deleted/?start=2013-05-05T00%3A00%3A00%2B00%3A00&end=2013-05-10T00%3A00%3A00%2B00%3A00 -H "Authorization: Bearer token"Example request body
None required
JSON example response body
1{
2 "deletedRecords" :
3 [
4 {
5 "id" : "a00D0000008pQRAIA2",
6 "deletedDate" : "2013-05-07T22:07:19.000+0000"
7 }
8 ],
9 "earliestDateAvailable" : "2013-05-03T15:57:00.000+0000",
10 "latestDateCovered" : "2013-05-08T21:20:00.000+0000"
11}XML example response body
1<?xml version="1.0" encoding="UTF-8"?>
2<Merchandise__c>
3 <deletedRecords>
4 <deletedDate>2013-05-07T22:07:19.000Z</deletedDate>
5 <id>a00D0000008pQRAIA2</id>
6 </deletedRecords>
7 <earliestDateAvailable>2013-05-03T15:57:00.000Z</earliestDateAvailable>
8 <latestDateCovered>2013-05-08T21:20:00.000Z</latestDateCovered>
9</Merchandise__c>