Skip to main content
Manage workspaces (accounts) in multi-tenant OpenViking deployments. Workspaces provide isolated environments for teams with separate data, users, and API keys.
Admin APIs require root_api_key to be configured in the server. Only ROOT users can create and delete workspaces.

Workspace Architecture

Each workspace has:
  • Isolated AGFS storage (viking://user/, viking://agent/, etc.)
  • Separate VectorDB namespace
  • Independent user management
  • At least one ADMIN user

Create Workspace

Create a new workspace with its first admin user. This initializes all required directories and storage. Authentication: ROOT only

Request Body

string
required
Unique workspace identifier
string
required
User ID for the first admin of this workspace

Response

string
Response status (ok or error)
object
Creation result
number
Request processing time in seconds

Example

List Workspaces

List all workspaces with user counts and creation timestamps. Authentication: ROOT only

Response

string
Response status (ok or error)
array
Array of workspaces
number
Request processing time in seconds

Example

Delete Workspace

Delete a workspace and all associated data including users, API keys, AGFS storage, and VectorDB records. Authentication: ROOT only
This operation is irreversible. All workspace data will be permanently deleted:
  • All users and their API keys
  • All AGFS data (viking://user/, viking://agent/, viking://session/, viking://resources/)
  • All VectorDB embeddings and metadata

Path Parameters

string
required
Workspace ID to delete

Response

string
Response status (ok or error)
object
Deletion result
number
Request processing time in seconds

Example

Cascade Deletion Details

When a workspace is deleted, the following cleanup occurs:

1. AGFS Data Cleanup

All directories for the account are removed:

2. VectorDB Cleanup

All vectors and metadata tagged with the account ID are deleted from:
  • Context collection
  • Any custom collections

3. User and Key Cleanup

All users in the workspace and their API keys are removed from the key manager.

Complete Workflow Example

Configuration

To enable admin APIs, configure the root API key in your server:
Generate a secure root key:

Multi-Tenant Best Practices

The root API key has full system access. Generate cryptographically secure keys and store them securely (e.g., in a secrets manager).
  • Create workspaces and initial admins with ROOT
  • Let ADMIN users manage their own workspace users
  • Only use ROOT for workspace deletion and role changes
Use lowercase identifiers with hyphens:
  • acme-corp
  • team-alpha
  • AcmeCorp
  • team_alpha
  • Create workspaces for teams/projects
  • Archive data before deletion
  • Remove unused workspaces periodically
  • Monitor workspace resource usage