+ Start a Discussion
Sornakumar SundararajanSornakumar Sundararajan 

Does Force.com REST API support ETags on GET?

I am using the Force.com REST API. Whenever I do a GET on a particular object, I don't get an ETag. Does Force.com REST API support ETags? If so, is there some documentation on how to go about using this?

Thanks, Sornakumar
Daniel BallingerDaniel Ballinger
I found the following documentation on ETags in Using Conditional Requests (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest_conditional_requests.htm?search_text=Etag):
The ETag header is a response header that’s returned when you access the SObject Rows resource. It’s a hash of the content that’s used by the If-Match and If-None-Match request headers in subsequent requests to determine if the content has changed. 
Supported resources: SObject Rows (account records only)

Note how  the documentation indicates it is only supported on Account records. The same is true of If-Match and If-None-Match.

It isn't clear why this functionality is restricted to Accounts, but it appears to be the case.