You need to sign in to do that
Don't have an account?

Pls. help with query for IsDeleted field REST API
I am using the standard http based REST API via Xml (i.e. not APEX or SOAP) and so the QueryAll() method is not available.
I have tried various queries but can't get this to work..
What am I doing wrong here..?
SELECT Id, IsDeleted FROM Account WHERE IsDeleted=true <QueryResult> <done>true</done> <totalSize>0</totalSize> </QueryResult>
SELECT Id, IsDeleted FROM Account WHERE IsDeleted=true ALL ROWS <Errors> <Error> <errorCode>MALFORMED_QUERY</errorCode> <message>ALL ROWS not allowed in this context</message> </Error> </Errors>
Rest API is for another usage than Soap API.
For data replication / sync, you have to use the Soap Api, beacuse you have dedicated verbs for this : getDeleted, get Updated, capability to query on deleted records...
Think about using the Rest Api for single record usage by a final user. For instance, if you are developing a mobile app, Rest Api would be appropriate
All Answers
You can't retrive deleted records using the REST Api
Just to double check, are you absolutely sure..?
I just can't see why it wouldn't be possible since Salesforce obviously wants us to use their API and promote their service as much as possible service via apps. What would the reason be? My app needs to sync changed/deleted items and it is crucial to be able to retrieve only deleted items.
Rest API is for another usage than Soap API.
For data replication / sync, you have to use the Soap Api, beacuse you have dedicated verbs for this : getDeleted, get Updated, capability to query on deleted records...
Think about using the Rest Api for single record usage by a final user. For instance, if you are developing a mobile app, Rest Api would be appropriate
I am afriad it is a mobile app and I need the REST API.
But I still can't understand why it should'nt be possible to retreive deleted items. It's just a huge and unnessasary constraint in my oppinion
Anyway, many thanks for your comments
It is not available in the REST API.
I've encountered the same limitation. I simply wanted to give you my +1.
There quite a few requests for this on the forums
http://boards.developerforce.com/t5/APIs-and-Integration/Query-All-using-REST-API/td-p/354341
The "ALL ROWS" keyword would work as well.
I see thanks.
Yes, there seems to be more users wanting this feature, especially for sync..
Please Salesforce, why can't you upgrade with such an essential detail? Many developers want to go for the pure HTTP REST and not the SOAP and in mobile apps particularily. I think you will cover 95% of all cases if only soft deleted records are shown but no hard deleted. A big step on the way.