Workspace

envless.workspace.get()

Read the workspace the key is bound to

ts
get(options?: RequestScope): Promise<CurrentWorkspaceResource>

Resolves 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 resolved CurrentWorkspaceResource 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 resolves a third shape, one that includes virtualEnvsEnabled but drops createdAt.

Example

ts
const workspace = await envless.workspace.get()

console.log(workspace.slug)

Parameters

ParameterTypeRequiredDescription
options.signalAbortSignalNoCancels the request.

Returns

CurrentWorkspaceResource 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_found code, so only the message tells it apart from any other 404.
  • Reach for envless.workspaces.list when you need plan, virtualEnvsEnabled or customDomain.

Required scopes

workspace:read

Underlying endpoint

GET /workspace

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

In Python

envless.workspace.get()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.workspace.get

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->workspace->get()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.