Question

I am a bit new to Google Spreadsheets API I am trying to get right responses from google and now I am stuck with ETag. The fact is that i don't get any ETag at all with standard GET query like that:

https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full/

The response is:

<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:gsx="http://schemas.google.com/spreadsheets/2006/extended"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
<id>
https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full
</id>
<updated>2013-09-30T11:39:01.088Z</updated>
<category scheme="http://schemas.google.com/spreadsheets/2006"     term="http://schemas.google.com/spreadsheets/2006#list"/>
<title type="text">Sheet1</title>
<link rel="alternate" type="text/html" href="https://spreadsheets.google.com/ccc?key=tCOhygAeHDCgliY3E8uONNA"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full"/>
<link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml" href="https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full"/>
<link rel="self" type="application/atom+xml" href="https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full"/>
<author>
<name>promo</name>
<email>promo@balderbetter.com</email>
</author>
<openSearch:totalResults>1</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<entry>
<id>
https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full/cokwr
</id>
<updated>2013-09-30T11:39:01.088Z</updated>
<category scheme="http://schemas.google.com/spreadsheets/2006" term="http://schemas.google.com/spreadsheets/2006#list"/>
<title type="text">Value 1</title>
<content type="text">header2: Value 2</content>
<link rel="self" type="application/atom+xml" href="https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full/cokwr"/>
<link rel="edit" type="application/atom+xml" href="https://spreadsheets.google.com/feeds/list/tCOhygAeHDCgliY3E8uONNA/od6/private/full/cokwr/1jlaa31hglf"/>
<gsx:header1>Value 1</gsx:header1>
<gsx:header2>Value 2</gsx:header2>
</entry>
</feed>

I am reffering here to https://developers.google.com/google-apps/spreadsheets/?hl=ru#retrieving_a_list-based_feed which shows ETag presence in this type of response!

But as you can see there are no any ETag here neither in header nor in enrty node (gd:etag) Is it me or Google just changed schema without notifying us?

p.s. Sorry for poor English and thanks for help in advance

Was it helpful?

Solution

Adding the HTTP header "GData-Version: 3.0" to my requests solved this problem for me.

Before adding the header either the feed nor the entry elements did not have a specified ETag.

The documentation states that it is not necessary to specify the header, as version 3.0 should be the default, but it seems that omitting it does have some side effects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top