3

We have a requirement where we need to get a list of deleted and updated records for a given object type. Is this possible currently using REST Api. We know this is possible throught Soap api. But currently we are using Rest for all calls. In REST api documentation we found this link https://www.salesforce.com/us/developer/docs/api_rest/Content/dome_get_deleted.htm But each time we try using this for get deleted or get updated we get a 404 error (requested resource not found).

So is getting deleted/updated records really possible through REST Api.

PS: i also saw https://developer.salesforce.com/forums/ForumsMain?id=906F00000009AP7IAM which mentions its not possible but since this is somewhat old link, i dont know if there are some additions to REST Api.

Thanks

  • 1
    Can you post what the headers look like that you're sending to salesforce? Remember to redact the session ID. – sfdcfox Jun 19 '14 at 13:16
  • Very odd: Using Workbench REST Explorer GET: /services/data/v30.0/sobjects/account/deleted​​​/?start=2013-01-01T00:00:00+00:00&end=2014-06-19T00:00:00+00:00 I get 404 with message "Provided external ID field does not exist or is not accessible: deleted​​​". It is as if SFDC REST is looking for an id and ignores the keyword 'deleted'. Tried with V29.0, v30.0, v31.0 - same results. n.b the link in the developer.salesforce.com forums is from pre V29 when this feature was enabled. – cropredy Jun 20 '14 at 0:18
2

I think that rest call works, at least it did for me using Postman. It's kind of a pain to format things though. When I first tried this, I kept getting an invalid date error no matter how nicely I thought the formatting was that I was passing.

This date format didn't work at all in postman.

2014-06-19T00:00:00+00:00

I had to use the encoded version:

2014-06-19T00%3A00%3A00%2B00%3A00

I don't know if this is a Postman thing, or that the service is finicky. But, I got it to work.

Here it is in action: enter image description here

Here is a nice link to some sfdc docs showing this working as well: http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#CSHID=intro_rest_resources.htm|StartTopic=Content%2Fintro_rest_resources.htm|SkinName=webhelp

Best of luck!

-Wes

  • Wes1278: what were your headers? I'm puzzled why it works in postman and not in workbench's rest explorer. – cropredy Jun 22 '14 at 14:52
  • I left my URL Params in there for the screenshot. The only Header I have is Authorization Bearer: and then my session ID which I just ripped from my sfdc cookie. When I get time, I'll try this in workbench. – wes1278 Jun 24 '14 at 23:48
  • @basstrekker87 did this fix your problem? – wes1278 Jul 2 '14 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.