Workspace

Envless.workspace.domain.get

Read the custom domain and its DNS records

def get(timeout: nil)

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

ruby
require "envless/sdk"

domain = Envless.workspace.domain.get

if domain
  domain[:records].each do |record|
    puts "#{record[:type]} #{record[:name]} #{record[:value]}"
  end
end

Parameters

ParameterTypeRequiredDescription
timeout:Integer | Float | RationalNoSeconds 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

  • 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.