Exposing appengine cloud endpoints api on custom d

2019-09-14 13:15发布

问题:

I have set of apis written on google appengine using google cloud endpoints. I want to publish these api's for other developers to consume by releasing the documentation generated through api-explorer. For this I would want my apis to be exposed on url such as https://api.example.com/v1/ but all my api endpoints generated through appengine have a url signature as https://module-dot-project-name.appspot.com/_ah/api/v1/. I have tried mapping my api.example.com to the module serving the api's using the dispatch file, but I could not get my apis to work on my own domain address.

1) How can I get my apis to work on my own domain name?

2) How can I publish my api documentation using api-explorer serving on my own domain address? On url such as https://apis-explorer.appspot.com/apis-explorer/?base=https://api.example.com#p/

回答1:

1) is now possible with the newer version of cloud endpoints, called Cloud Endpoints Framework. Here is the documentantion, but if you are using the App Engine Standard environment it just works.

2) I'm not sure is possible. I only wrote this answer to addres number 1. :)



回答2:

Unfortunately, you can't. From the documentation:

Note: Google Cloud Endpoints does not support custom domains.