Google Analytics数据Feed API错误414 URI太大 [英] Google Analytics Data Feed API Error 414 URI Too Large

查看:152
本文介绍了Google Analytics数据Feed API错误414 URI太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将google analytics数据API与python gdata库结合使用时,我们按照此处文档中的说明汇编GET请求: http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html

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

然而,我们遇到了问题。随着我们的请求变得越来越长,当我们有大量过滤器时,我们偶尔会得到414错误URI太大。

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.

有没有办法使用POST请求gdata API或以其他方式绕过414?

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

编辑:只是尝试使用POST请求并获得403目标提要是只读的。有没有办法解决这个限制?

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

推荐答案

无论您是使用GET还是使用GET,过滤器都有128个字符的限制POST。任何比这长的东西都会导致400错误。围绕该长度限制的唯一方法是使用AND / OR布尔逻辑。

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.

以下是来自Google的完整说明:
过滤表达式规则

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

这篇关于Google Analytics数据Feed API错误414 URI太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆