Skip to main content

getPortalPath

StringWrapper getPortalPath(virtualPath)

GET /api/2.0/portal/path

Get a path to the portal

Turns a portal-relative path into the absolute URL a client can open, filling in the scheme, the current portal domain and the virtual root the portal is hosted on. Any signed-in user may call it, nothing has to be called first, and the call is read-only and idempotent - it neither checks that the path exists nor that the caller is allowed to open it. virtualPath is taken as it is: an omitted or empty value yields the portal root, a value starting with / is appended to that root, a value starting with ~/ is resolved against the virtual root, and a value that already starts with http://, https:// or mailto: is handed back unchanged. The answer is a bare JSON string. The domain in the result is the one the portal answers on right now, so a renamed portal starts returning the new domain without any change on the client. Use it to build links that have to survive a rename; the portal's own addresses and settings are read from GET api/2.0/settings instead.

Parameters​

NameInTypeDescriptionNotes
virtualPathqueryStringThe path to resolve. It is taken as it is: an omitted or empty value yields the portal root, a value starting with / is appended to that root, a value starting with ~/ is resolved against the virtual root, and one that already begins with http://, https:// or mailto: is handed back unchanged. Nothing checks that the path exists or that the caller may open it.[optional] [example: /portal/documents]

Responses​

Status codeDescriptionTypeResponse headers
200The absolute URL that the given portal-relative path resolves toStringWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

StringWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json