BigQuery res api

I'm new to BigQuery and have worked with the bq tool so far. Now I want to request my data through my web application.

My request is simple. I want to query a url like this xxx.com/schema=x&query= "select * from my table" and get json, I will make queries from a specific server IP.

Sounds simple so I open the credentials tab in google developer console and where there are so many options

  • Web application
  • service account
  • Installed app (android / chrome / ios / other)
  • authorized javascript sources
  • allowed redirect sources

security keys: CLIENT ID, CLIENT SECRET, E-MAIL ADDRESS, PUBLIC KEY PRINTS, and JSON security file.

With all the access options and security levels I've lost, I don't know even if my request is possible. What would the url for a bq request look like? what should I do?

+3


source to share


1 answer


If users need to use your app with their BigQuery data, then you need to use the web app credentials. But this is more like your own company / project, so a service account is what you are looking for. More information: https://developers.google.com/accounts/docs/OAuth2#serviceaccount

Then you can use oauth2 authentication for example. for python you can read it here: https://developers.google.com/api-client-library/python/guide/aaa_oauth

Regarding how URLs should look like, it shouldn't be too hard. You can find it here: https://developers.google.com/bigquery/docs/reference/v2/



Most client libraries have a 'build' function designed for the API. You can look into it here: https://developers.google.com/apis-explorer/#p/bigquery/v2/

If you have specified your platform, I might have helped more specifically. I am having a hard time implementing Google native APIs in App Engine using django-nonrel; I wish you the best.

+1


source







All Articles