Google Cloud AutoML API REST调用 [英] Google Cloud AutoML API REST call

查看:182
本文介绍了Google Cloud AutoML API REST调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Postman向Google Cloud AutoML API发送一个简单的请求,并且我一直在这里阅读文档: https://automl.googleapis.com/v1beta1/ {name}

其中name是要检索的数据集的资源名称".

资源名称到底是什么?

我的Google Cloud AutoML中有一个数据集,并且我将数据集的名称代替了{name}部分,但是我一直收到"404错误"的消息.

我似乎无法在线找到实际将REST api调用发送到Google AutoML的示例.任何帮助是极大的赞赏.谢谢!

解决方案

此处的文档不是很清楚,端点不正确,建议您查看此处中进行了说明. 获得访问令牌后,应将请求的标头授权"设置为承载{access-token}".

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!

解决方案

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}".

这篇关于Google Cloud AutoML API REST调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆