This guide shows you how to run multiple independent APIs on your own domain.
Before you begin
If you are using a custom domain, follow the instructions in Serving an API from Your Domain Name. During that process, you must confirm ownership of the domain. This confirmation allows you to deploy and service APIs on any of its subdomains.
For example, if ownership is established for
api.example.com, service names
can include subdomains of
api.example.com such as
The remainder of this guide uses
example.com as the custom domain.
Deploying an API on a Subdomain
The following example deploys the API to the subdomain
Follow the instructions described in Compute Engine tutorial to deploy this API, making sure the hostname in your OpenAPI specification is set to the subdomain
Confirm that your API is deployed by making sure it is listed in the Endpoints Dashboard.
Now you can send requests to
first_api.example.com and view graphs of those
requests in the Cloud Console Endpoints dashboard.
Deploying Your Next API
To deploy another API, repeat the steps detailed above, changing the subdomain
first_api.example.com to the subdomain you are using for the next API.