Rest AppNexus API未返回维度

Rest AppNexus API未返回维度,rest,Rest,我正在尝试设置与的集成,遇到了问题,不知道StackOverflow社区中是否有人可以分享一些见解 AppNexusAPI使用了curl进行了一次遍历,除了没有返回组/维度之外,它还可以正常工作。以下是我所做的: 有一个名为auth的文件包含我们的凭证: # JSON file containing our credentials $ cat auth { "auth": { "username" : "ourAppNexusApiUsername", "

我正在尝试设置与的集成,遇到了问题,不知道StackOverflow社区中是否有人可以分享一些见解

AppNexusAPI使用了
curl
进行了一次遍历,除了没有返回组/维度之外,它还可以正常工作。以下是我所做的:

有一个名为
auth
的文件包含我们的凭证:

# JSON file containing our credentials
$ cat auth
{
    "auth": {
        "username" : "ourAppNexusApiUsername",
        "password" : "ourSecretApiUserPassword"
    }
}
还有一个包含查询的JSON文件。注意“列”列表中的尺寸:

我能够验证:

$ curl -b cookies -c cookies -X POST -d @auth 'https://api.appnexus.com/auth'

{"response":{"status":"OK","token":"hbapi:133820:5571c87753c27:nym2","dbg_info":{"instance":"56.bm-hbapi.prod.lax1","slave_hit":false,"db":"master","parent_dbg_info":{"instance":"63.bm-hbapi.prod.nym2","slave_hit":false,"db":"master","parent_dbg_info":{"instance":"38.bm-api.prod.nym2","slave_hit":false,"db":"master","time":482.32913017273,"version":"1.15.279","warnings":[],"slave_lag":0,"start_microtime":1433520246.311},"awesomesauce_cache_used":false,"count_cache_used":false,"warnings":[],"time":1078.0298709869,"start_microtime":1433520246.2796,"version":"1.15.527","slave_lag":0,"output_term":"not_found"},"awesomesauce_cache_used":false,"count_cache_used":false,"warnings":[],"time":1360.9290122986,"start_microtime":1433520246.1491,"version":"1.15.527","slave_lag":1,"output_term":"not_found","master_instance":"63.bm-hbapi.prod.nym2","proxy":true,"master_time":1078.0298709869}}}
我可以为给定的发布者请求一份报告。它返回一个
报告id
:72734c3a2df81522c7bae6684cfdd65c

$ curl -b cookies -c cookies -X POST -d @query.json 'http://api.appnexus.com/report?publisher_id=510332'

{"response":{"status":"OK","report_id":"72734c3a2df81522c7bae6684cfdd65c","existing":false,"cached":true,"dbg_info":{"instance":"58.bm-hbapi.prod.lax1","slave_hit":false,"db":"master","reads":0,"read_limit":100,"read_limit_seconds":60,"writes":1,"write_limit":60,"write_limit_seconds":60,"parent_dbg_info":{"instance":"61.bm-hbapi.prod.nym2","slave_hit":false,"db":"master","reads":0,"read_limit":100,"read_limit_seconds":60,"writes":1,"write_limit":60,"write_limit_seconds":60,"awesomesauce_cache_used":false,"count_cache_used":false,"warnings":[],"time":264.3940448761,"start_microtime":1433520268.8354,"version":"1.15.527","output_term":"not_found","reporting_dbg_info":{"instance":"11.bm-report-processor.prod.nym2","version":"1.72.130","time":1094.5529937744,"start_microtime":1433520268,"warnings":[],"api_cache_hit":"0","output_term":null}},"awesomesauce_cache_used":false,"count_cache_used":false,"warnings":[],"time":1238.8980388641,"start_microtime":1433520267.9206,"version":"1.15.527","output_term":"not_found","master_instance":"61.bm-hbapi.prod.nym2","proxy":true,"master_time":264.3940448761}}}
我可以下载报告,但遗憾的是,报告组不见了:

我想我不是第一个遇到这种情况的人。有人有什么想法/建议吗

编辑:

我上传了一个文件,以便于测试

此外,AppNexus通过电子邮件回复:

看起来你已经拿到了一些手机文档 报告,而不是我们的标准出版商分析报告。 您应该将“组”更改为“行每”,如下所示:

我尝试过这个,但没有成功。

Appnexus的web UI使用相同的API来提供内容

如果您能够通过运行报表生成所需的输出,则可以通过单击屏幕底部的“打开API查看器”对API调用进行反向工程。这将显示用于创建报表的API参数。

AppNexus tech writer(几个月后!)。我很确定 该页面上的示例报告API调用是错误的(我刚刚 修复了它–您可以查看它)

在测试报告API调用后,我的理解是:

  • 文档中的“坏”例子不起作用(正如你所说的——现在) (固定)
  • 只要对数据进行分组,就可以获得分组行为 (使用您明确要求的“row_per”)(使用 “栏目”)
  • 换句话说,您必须在“列”中请求数据字段,然后 使用“row_per”将它们分组(或者更可能是一个子集) 我在更新的文档中使用的示例:

    {
        "report": {
            "report_type": "publisher_analytics",
            "report_interval": "yesterday",
            "columns": [
                "geo_country",
                "imp_type",
                "placement",
                "clicks",
                "total_convs",
                "publisher_revenue"
            ],
            "groups": [
                "geo_country",
                "imp_type",
                "placement",
            "imps_total"
            ],
            "name": "Publisher Analytics - 10/30/2015"
        }
    }
    
    我在上面的“bad”周围加了引号,因为我不确定它是否是一个bug 在我们的API或预期行为中-我正在尝试找出答案 现在和我们的工程团队在一起,但现在是星期五下午,所以我可以 我必须稍后再办理登机手续

    无论如何,我已经更新了上的示例以反映 目前测试的实际行为

    还有两件事:

  • 该页面是我们定期发布的出版商分析报告。它是 不是特定于手机的,我们也只是在那里发布了,所以 可为部分客户的外部客户提供。 抱歉搞混了

  • 根据我今天下午的测试,“row_per”和 “群体”既起作用,又表现出相同的行为


  • 我可能已经来不及帮你了,但希望这对其他人有用!

    你也有CLI访问权限吗?也许通过
    manage netezza table list
    你可以看到你是否真的有这样的专栏hanks@avnr。我以前没有使用过appnexus CLI。现在就尝试一下。我启动了一个CentOS VM,并尝试根据文档安装CLI精神状态()。它无法解析repo:
    无法解析主机“yum.local.appnexus.net”
    通过CLI或其他方式验证我的假设可能会有所帮助,但即使没有这样的验证,问题似乎也不是组的检索,而是您请求的报告一开始没有这样的选择器在AppNexus的支持电子邮件中,他们没有将
    组列为示例中的选择器。您应该尝试使用带有单个组限定符的
    row\u per
    ,例如,
    row\u per:[“publisher\u id”]
    并分别为每个组生成一份报告。希望您能找到一个或多个受支持的组,然后将它们组合在一起。
    $ curl -b cookies -c cookies 'http://api.appnexus.com/report-download?id=72734c3a2df81522c7bae6684cfdd65c'
    
    imps_total,imps_kept,imps_resold,publisher_filled_revenue,total_convs
    65086432,0,42898432,1234.776809,4
    
    {
        "report": {
            "format": "csv",
            "report_interval": "yesterday",
            "row_per": [
                "hour"
            ],
            "columns": [
                "imps_total"
            ],
            "report_type": "publisher_analytics"
        }
    }
    
    {
        "report": {
            "report_type": "publisher_analytics",
            "report_interval": "yesterday",
            "columns": [
                "geo_country",
                "imp_type",
                "placement",
                "clicks",
                "total_convs",
                "publisher_revenue"
            ],
            "groups": [
                "geo_country",
                "imp_type",
                "placement",
            "imps_total"
            ],
            "name": "Publisher Analytics - 10/30/2015"
        }
    }