Workspace Management¶
A workspace is the top-level isolation boundary in AI Studio. Connectors, Catalog objects, compute resources, workflows, knowledge bases, and agents belong to a workspace. Console routes and backend requests also carry workspace context.
Current SDK boundary¶
The current public Python and Go SDKs do not expose methods to:
list, create, rename, or delete workspaces;
switch a
RawClientby workspace ID; orset a workspace ID through a call option.
RawClient in both SDKs accepts only the Catalog Service base URL and an API
key. It automatically sends moi-key, but it does not expose or rewrite the
workspace context. Do not invent a workspace header, query parameter, or
endpoint, and do not append the console route /$workspaceId/ to the SDK base
URL.
Create a client for the target workspace¶
Obtain the Catalog Service base URL and corresponding API key from the target environment’s supported integration flow:
import os
from moi import RawClient
client = RawClient(
base_url=os.environ["MOI_BASE_URL"],
api_key=os.environ["MOI_API_KEY"],
)
client, err := sdk.NewRawClient(
os.Getenv("MOI_BASE_URL"),
os.Getenv("MOI_API_KEY"),
)
if err != nil {
log.Fatal(err)
}
Store this connection with the application’s environment or workspace mapping, then validate the target through a read-only operation such as reading the current user or listing catalogs. If an SDK resource does not carry a public workspace ID, do not infer one from that resource.
Integrate with multiple workspaces¶
When an application must connect to several workspaces, create a separate client for each base URL and API key pair confirmed by the deployment owner. Do not inject an undocumented workspace header into one shared client.
A useful local connection record contains:
Local setting |
Purpose |
|---|---|
Application workspace alias |
Selects a connection locally; it is not sent by the SDK |
Catalog Service base URL |
Constructs |
Secret reference |
Retrieves the API key from a secret manager |
Verification metadata |
Stores the last verification time and a non-sensitive caller ID |
Split cross-workspace batch processing into independent execution units, each with its own rate limiting, retries, and request IDs. Treat a resource ID as valid only within its service context; matching names or IDs do not prove that two resources in different workspaces are the same.
Workspace administration¶
Create, rename, delete, and copy-ID operations currently belong in the console or in an administrative interface formally supplied by the deployment. See Workspaces for the product workflow. If a future SDK release adds workspace types and methods, follow that release’s source and notes rather than constructing requests from console behavior.
For users and roles, see Member Management. For authorization and request correlation, see Permissions and Audit Logs.