const workspace = await airstore.workspaces.create({ name: 'my-workspace' })
Workspaces are the top-level container for connections, smart folders, members, and the virtual filesystem.
create()
Create a new workspace.
const workspace = await airstore.workspaces.create({ name: 'acme-eng' })
Parameters
| Parameter | Type | Required | Description |
|---|
name | string | Yes | Display name for the workspace |
Returns Promise<Workspace>
| Field | Type | Description |
|---|
external_id | string | Unique workspace identifier (UUID) |
name | string | Display name |
tenant_id | string | undefined | Tenant ID, set when created by an org token |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
list()
List workspaces accessible to the current token.
const workspaces = await airstore.workspaces.list()
Organization tokens see all workspaces in their tenant. Workspace tokens see only their workspace.
Returns Promise<Workspace[]>
retrieve()
Get a single workspace by ID.
const workspace = await airstore.workspaces.retrieve('ws_abc123')
Parameters
| Parameter | Type | Required | Description |
|---|
id | string | Yes | Workspace external ID |
Returns Promise<Workspace>
Throws NotFoundError if the workspace doesn’t exist.
del()
Delete a workspace and all its data.
await airstore.workspaces.del('ws_abc123')
This permanently deletes all connections, smart folders, members, and tokens in the workspace.
Parameters
| Parameter | Type | Required | Description |
|---|
id | string | Yes | Workspace external ID |
Returns Promise<void>