Google DoubleClick Bid Manager API 创建查询

Google DoubleClick Bid Manager API create query

我正在尝试使用 google doubleclick bid manager API(版本 1)创建查询。我的要求是

POST https://www.googleapis.com/doubleclickbidmanager/v1/query?fields=metadata(dataRange%2CgoogleDrivePathForLatestReport)%2Cparams(filters%2CgroupBys)%2CqueryId&key={YOUR_API_KEY}

{
 "kind": "doubleclickbidmanager#query",
 "params": {
  "metrics": [
   "METRIC_BILLABLE_COST_ADVERTISER",
   "METRIC_IMPRESSIONS"
  ],
  "type": "TYPE_GENERAL",
  "filters": [
   {
    "type": "FILTER_LINE_ITEM_TYPE",
    "value": "RTB_VIDEO"
   }
  ]
 },
 "metadata": {
  "dataRange": "MONTH_TO_DATE",
  "format": "CSV"
 },
 "schedule": {
  "frequency": "ONE_TIME"
 }
}

我收到以下错误。

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  122
content-type:  application/json; charset=UTF-8
date:  Tue, 17 Jan 2017 12:16:07 GMT
expires:  Tue, 17 Jan 2017 12:16:07 GMT
server:  GSE
vary:  Origin, X-Origin

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "backendError",
    "message": "Backend Error"
   }
  ],
  "code": 500,
  "message": "Backend Error"
 }
}

导致错误的原因是什么?访问 DBM 报告的唯一方法是将它们安排到 运行 并在 Google 云中创建报告吗?

当我传递一个虚拟 queryID 时错误消失了。这是一个有效的请求。

{
 "kind": "doubleclickbidmanager#query",
 "metadata": {
  "dataRange": "MONTH_TO_DATE",
  "format": "CSV",
  "title": "test"
 },
 "params": {
  "filters": [
   {
    "type": "FILTER_PARTNER",
    "value": "xxxx"
   }
  ],
  "metrics": [
   "METRIC_IMPRESSIONS"
  ],
  "type": "TYPE_GENERAL"
 },
 "schedule": {
  "frequency": "ONE_TIME"
 },
 "queryId": "1232456"
}