domain.get(options?: RequestScope): Promise<CustomDomainResource | null>Resolves 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 null directly.
null 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
const domain = await envless.workspace.domain.get()
if (domain) {
for (const record of domain.records) {
console.log(record.type, record.name, record.value)
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options.signal | AbortSignal | No | Cancels the request. |
Returns
CustomDomainResource with status, records and the verification timestamps, or null when no domain is attached.
Worth knowing
retryAfterSecondsandcanReattempttell 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 Python
envless.workspace.domain.get()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.workspace.domain.get
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->workspace->domain->get()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.