def get(timeout: nil)def get: (?timeout: seconds?) -> current_workspace_resourceReturns the workspace the API key belongs to. The binding lives on the key, not on the request, so there is no argument that would point this method at a different workspace.
The returned current_workspace_resource is narrower than the workspace shape you get elsewhere: it carries id, name, slug, icon and createdAt only. plan, virtualEnvsEnabled and customDomain are absent here, and Envless.workspaces.list is the method that returns them. Envless.workspace.update returns a third shape, one that includes virtualEnvsEnabled but drops createdAt.
Example
require "envless/sdk"
workspace = Envless.workspace.get
puts workspace[:slug]Parameters
| 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
current_workspace_resource with id, name, slug, icon and createdAt.
Worth knowing
- A 404 here means the workspace was soft-deleted while the key survived. It carries the generic
request.not_foundcode, so only the message tells it apart from any other 404. - Reach for
Envless.workspaces.listwhen you needplan,virtualEnvsEnabledorcustomDomain.
Required scopes
workspace:read
Underlying endpoint
GET /workspace
Request and response schema, every error code, and a live playground.
In TypeScript
envless.workspace.get()
The same method in @goenvless/sdk, with the same request, retries and errors.