Google Cloud AutoML API REST call

2019-09-03 14:25发布

I'm trying to send a simple request, via Postman, to the Google Cloud AutoML API, and I've been reading the documentation here: https://cloud.google.com/vision/automl/docs/reference/rest/v1beta1/projects.locations.datasets/get

On the page, it says the REST endpoint should be like so:

GET https://automl.googleapis.com/v1beta1/{name}

where name is the "resource name of the dataset to retrieve".

What exactly is the resource name?

I have a dataset in my Google Cloud AutoML, and I'm putting the name of the dataset in place of the {name} part but I keep getting "404 error".

I can't seem to find examples online of actually sending REST api calls to Google AutoML. Any help is greatly appreciated. Thanks!

标签: api cloud automl
1条回答
Deceive 欺骗
2楼-- · 2019-09-03 15:01

the doc is not really clear here, the endpoint is not correct, I advise you to have a look at this. The correct endpoint is :

https://automl.googleapis.com/v1beta1/projects/{YOUR-PROJECT-ID}/locations/us-central1/datasets

You'll need OAuth2 authentification, which is explained here . Once you have an access token, you should set the header "Authorization" of your request to "Bearer {access-token}".

查看更多
登录 后发表回答