If you want to configure the Datashare API to have a custom URL, you must configure a load balancer.
For further information see the following:
- https://cloud.google.com/api-gateway/docs/using-custom-domains
- https://cloud.google.com/api-gateway/docs/gateway-serverless-neg
Example setup for the domain: api.datashare-demo-2.fsi.joonix.net
DOMAIN=api.datashare-demo-2.fsi.joonix.net
gcloud beta compute network-endpoint-groups create api-gateway-serverless-neg \
--region=us-central1 \
--network-endpoint-type=serverless \
--serverless-deployment-platform=apigateway.googleapis.com \
--serverless-deployment-resource=api-gw-ds-api
gcloud compute backend-services create datashare-api-gateway-backend-service \
--global
gcloud compute backend-services add-backend datashare-api-gateway-backend-service \
--global \
--network-endpoint-group=api-gateway-serverless-neg \
--network-endpoint-group-region=us-central1
gcloud compute url-maps create datashare-api-gateway-url-map \
--default-service datashare-api-gateway-backend-service
gcloud compute ssl-certificates create datashare-lb-ssl-cert \
--domains $DOMAIN
gcloud compute target-https-proxies create datashare-target-http-proxy \
--ssl-certificates=datashare-lb-ssl-cert \
--url-map=datashare-api-gateway-url-map
gcloud compute forwarding-rules create datashare-lb-forwarding-rule \
--target-https-proxy=datashare-target-http-proxy \
--global \
--ports=443
gcloud domains verify $DOMAIN
gcloud domains list-user-verified