def get(timeout: nil)def get: (?timeout: seconds?) -> custom_domain_resource?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 nil directly.
nil 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
require "envless/sdk"
domain = Envless.workspace.domain.get
if domain
domain[:records].each do |record|
puts "#{record[:type]} #{record[:name]} #{record[:value]}"
end
endParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
custom_domain_resource with status, records and the verification timestamps, or nil 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 TypeScript
envless.workspace.domain.get()
The same method in @goenvless/sdk, with the same request, retries and errors.