For a Resource Name find the appropriate HTTP Rest URL for it.
With the help of the below Google Doc, for some resources name to URL mapping is working fine
Example:
Basically adding HTTPS scheme before the name and the API major version before the resource path this works fine.
But the problem is this conversion scheme is not consistent for some resources if we form URL with this approach it will differ from the actual URL
Example:
Compute Engine API Reference: https://cloud.google.com/compute/docs/reference/rest/v1
Other resources apart from compute also have actually different URL from the generated one using the above method.
Queries are:
Google APIs have a discovery document.
In that JSON file, there are 2 fields revelant for this question: rootUrl
and servicePath
.
To construct a proper URL for the API, concatenate both values.
More details in the discovery service docs.