Resolve the base URL to use for apiId from a /foundation/versions
entry: its own api_base_url when the server relocated the API, otherwise
{serverBaseUrl}/{apiId}/{version_id} (Foundation API §2.1: api_base_url
is optional — "to allow servers to relocate the API").
Unlike normalizeApiBaseUrl, a server-provided api_base_url is trimmed
of only a trailing slash, never a version segment: .../documents/1.0 IS
the API's own base URL here (the version already sits at its end), not a
user-typed address with a version pasted on by mistake.
Resolve the base URL to use for
apiIdfrom a/foundation/versionsentry: its ownapi_base_urlwhen the server relocated the API, otherwise{serverBaseUrl}/{apiId}/{version_id}(Foundation API §2.1:api_base_urlis optional — "to allow servers to relocate the API").Unlike
normalizeApiBaseUrl, a server-providedapi_base_urlis trimmed of only a trailing slash, never a version segment:.../documents/1.0IS the API's own base URL here (the version already sits at its end), not a user-typed address with a version pasted on by mistake.