问题
How do I find my 'datasetID' for making google datastore queries?
This site is supposed to tell me how to query my google datastore: https://developers.google.com/datastore/docs/apis/v1beta2/
and it says the base URL is: https://www.googleapis.com/datastore/v1beta2/datasets
the tutorial says to use a 'datasetID', so for example a full URL could be:
https://www.googleapis.com/datastore/v1beta2/datasets/12345/lookup
But I don't know how to figure out what my 'datasetID' is.
On the google developer console dashboard I see: -projectID -projectName
and under Storage/Cloud data store/Query/
I see 'Entities' 'Name/ID'
but it doesn't say 'datasetID'
I've tried using the Name/ID like:
https://www.googleapis.com/datastore/v1beta2/datasets/5649323916754345244544/lookup
Then I just get the response 'Not found'
回答1:
Your dataset id is the name of your Cloud project. Somewhat hard to find, but from the getting started guide:
You have your (same identifier as your Google Cloud Project ID).
So it will look something like:
my-test-app123
In order to make sure you're not running into other problems (like authentication), I would recommend testing this through the API explorer site: https://developers.google.com/apis-explorer/#p/datastore/v1beta2/datastore.datasets.lookup
来源:https://stackoverflow.com/questions/25097451/how-do-i-find-my-datasetid-for-making-google-datastore-queries