2
votes

When using the google analytics data API with the python gdata library, we are assembling a GET request per the instructions in the documentation here: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html

We are running into problems however. As our requests get longer, we're occasionally getting a 414 error URI Too Large when we have a lot of filters.

Is there any way to use a POST request with the gdata API or otherwise get around the 414?

EDIT: Just tried using a POST request and get 403 Target feed is read-only. Is there any way around this restriction?

1
Do you get the same error if you submit the query from the data feed explorer: code.google.com/apis/analytics/docs/gdata/gdataExplorer.html - M Schenkel
It looks like it just dies silently, so presumably so. If I shorten the filters string it works fine. - Travis

1 Answers

1
votes

There is a 128 character limit on filters regardless of whether you're using GET or POST. Anything longer than that will result in a 400 error. The only way around that length limit is to use AND/OR boolean logic.

Here's the full explanation from Google: Rules for Filter Expressions