Soheil Novinfard
Soheil Novinfard

Reputation: 1444

Access publicly to Google ML engine within REST API

I followed the following documentation by Google to create ML engine and I deployed my online predicator there:

https://cloud.google.com/ml-engine/docs/scikit/quickstart

I know that it's possible to access to the engine by RESTful api as described in below: https://cloud.google.com/ml-engine/docs/v1/predict-request#request-body

But I want all clients can access the API related to my model without OAuth or any type of authentication. How can I do this?

Upvotes: 1

Views: 470

Answers (2)

Bhupesh
Bhupesh

Reputation: 209

You can do this by granting modelUser role for that model to allUsers as follows:

gcloud ml-engine models add-iam-policy-binding mymodelname --member allUsers --role roles/ml.modelUser

Upvotes: 1

Ying Li
Ying Li

Reputation: 2519

You have to code your server to do that. You can have your server perform the API calls. Your clients simply access a frontend you designed to provide their parameters and your server makes the actual call. All the quota/charges would be with your API key, but the requests will be done with your Client's parameters.

Upvotes: 0

Related Questions