Workspace

envless.workspace.domain.get()

Read the custom domain and its DNS records

def get(
    *,
    timeout: float | None = None,
) -> CustomDomainResource | None

Returns the custom domain attached to the workspace, including the DNS records that still need publishing and the current lifecycle status. The SDK unwraps the domain envelope the API returns, so you get the resource or None directly.

None means no domain is attached, which covers both a workspace that never claimed one and a domain that was removed. Absence is not evidence that nothing was ever configured.

records is the authoritative list of what DNS must contain right now, and it changes as the domain moves from ownership proof to certificate validation. Re-read it between steps instead of caching the first response, and poll this method after envless.workspace.domain.verify rather than assuming certificate issuance completed inside that call.

Example

from envless import envless

domain = envless.workspace.domain.get()

if domain:
    for record in domain['records']:
        print(record['type'], record['name'], record['value'])

Parameters

ParameterTypeRequiredDescription
timeoutfloatNoSeconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off.

Returns

CustomDomainResource with status, records and the verification timestamps, or None when no domain is attached.

Worth knowing

  • retryAfterSeconds and canReattempt tell you whether another verify call will do real work or return the same state.

Required scopes

workspace:read

Underlying endpoint

GET /workspace/domain

Request and response schema, every error code, and a live playground.

In TypeScript

envless.workspace.domain.get()

The same method in @goenvless/sdk, with the same request, retries and errors.