qt - google-bigquery how to get datasetlist with https get? -
i'm trying dataset list bigquery webserver https get
following documentation here: https://developers.google.com/bigquery/docs/reference/v2/datasets/list
i'm using modified code from: http://code.google.com/p/qt-google-bigquery/source/browse/manager_bigquery.cpp
getdatasetslist(qstring strprojectid) { qstring url = qstring("https://www.googleapis.com/bigquery/v2/projects/%1/datasets?key=%2").arg(str_projectid).arg(this->api_key); //also tried without ?key= part qnetworkrequest request; request.seturl( qurl(url) ); //this urlencodes request.setrawheader("content-type", "application/json"); request.setrawheader("authorization", (qstring("bearer %1").arg(m_access_token)).tolatin1()); //here post request http asynchronously }
i error message:
reply = "{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "required parameter missing" } ], "code": 400, "message": "required parameter missing" } }
note: managed run query , results, access token seems valid, doing wrong here?
solved
ah, problem in coding, not request, posted http post, not get.
see reply in comment original poster above - create sure using instead of post method api phone call list datasets. other bigquery api methods utilize post, put, or patch.
https://developers.google.com/bigquery/docs/reference/v2/datasets/list
qt google-bigquery
No comments:
Post a Comment