Skip to main content
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
ParameterTypeRequiredDescription
namestringYesDisplay name for the workspace
Returns Promise<Workspace>
FieldTypeDescription
external_idstringUnique workspace identifier (UUID)
namestringDisplay name
tenant_idstring | undefinedTenant ID, set when created by an org token
created_atstringISO 8601 timestamp
updated_atstringISO 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
ParameterTypeRequiredDescription
idstringYesWorkspace 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
ParameterTypeRequiredDescription
idstringYesWorkspace external ID
Returns Promise<void>