Skip to main content

getPortalHostname

StringWrapper getPortalHostname()

GET /api/2.0/settings/machine

Get the portal hostname

Returns the hostname the current request arrived on, exactly as sent in the HTTP Host header, so a client mid-setup can learn the address the portal is actually reachable at. This call is not for a normal logged-in session: it requires a confirmation link bearing the Wizard claim, of the kind generated during initial portal setup, and the link is consumed as part of authenticating the request. This is a read-only, idempotent call. The value reflects whatever the caller connected through, including a reverse proxy's public name, and is not necessarily the tenant's configured alias or mapped domain.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200Hostname the current request arrived onStringWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.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