【问题标题】:Missing parameter error from google API来自谷歌 API 的缺少参数错误
【发布时间】:2018-08-28 20:52:40
【问题描述】:

我正在使用 OutSystems 连接到 Google BigQuery API。 我能够查询数据,当我只发送一个选择查询时,响应是成功的。

当我尝试将查询附加到表时,我使用了稍微不同的请求正文,并且不断收到以下错误;

 HTTP/1.1 400 BadRequest
Content-Type: application/json; charset=UTF-8
Vary: X-Origin,Origin,Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39,35"
Transfer-Encoding: chunked
Accept-Ranges: none
Cache-Control: private, max-age=0
Date: Tue, 28 Aug 2018 10:07:22 GMT
Expires: Tue, 28 Aug 2018 10:07:22 GMT
Server: GSE
{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "required",
        "message": "Required parameter is missing"
      }
    ],
    "code": 400,
    "message": "Required parameter is missing"
  }
}

我的要求是;

 {
"configuration" : {
    "query" : {
        "query" : "SELECT * FROM  Dataset.Table1 WHERE 1 = 1",
        "createDisposition" : "CREATE_IF_NEEDED",
        "destinationTable" : {
            "datasetId" : "DatasetId",
            "projectId" : "projectId",
            "tableId" : "table2Id"
            },
        "useLegacySql" : false,
        "writeDispostion" : "WRITE_APPEND"
        }
    }
}

我正在使用以下 URL 发送请求; https://www.googleapis.com/bigquery/v2/projects/{project}/查询

我错过了什么?在 Google API 文档中找不到它。

【问题讨论】:

    标签: google-bigquery google-apis-explorer


    【解决方案1】:

    您使用的是writeDispostion 而不是writeDisposition,此外,您可以检查this documentation 中的[Required] 属性名称。

    【讨论】:

      猜你喜欢
      • 2015-05-11
      • 1970-01-01
      • 2016-10-25
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 1970-01-01
      • 2017-08-01
      • 1970-01-01
      相关资源
      最近更新 更多