Accounts, Workspaces, and Permissions¶
The MOI Python and Go SDKs expose Catalog Service APIs for users, roles,
privileges, and administrative logs. Self-service account operations,
administrator-managed users, and permission configuration all use
RawClient; the Python and Go method sets closely correspond.
Supported surface¶
Area |
Current public SDK |
|---|---|
Current user |
Read and update the profile, change the password, read and refresh the API key |
User administration |
Create, read, replace roles, change status, reset password, and delete |
Roles and privileges |
Role CRUD, global privilege codes, object grants, and object-role associations |
Administrative logs |
User-change and role-change logs |
Workspace administration |
No methods to list, create, switch, rename, or delete workspaces |
An SDK user is a Catalog Service user and must not automatically be treated as a unified account-center identity. The public SDKs also do not expose a workspace invitation API. The target deployment’s integration configuration defines how Catalog Service, the account system, and workspaces are connected.
Create a client¶
Both SDKs require a Catalog Service base URL and API key. They automatically
authenticate with the moi-key request header:
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)
}
The base URL must include a scheme and host, and the API key cannot be empty. The default request timeout is 30 seconds. Both SDKs support a custom HTTP client, timeout, user agent, and request headers.
Do not substitute a Genesis model API bearer key or a browser cookie for the Catalog Service key. Obtain connection details through the supported flow for the target environment.
Read this section¶
Account Information covers the caller profile and current key.
Workspace Management defines workspace context and the operations not currently covered by the SDK.
Member Management creates and maintains Catalog Service users.
Permissions and Audit Logs configures roles and object privileges and reads administrative logs.
For troubleshooting, attach a request ID and handle the SDK’s service
APIError separately from its non-2xx HTTPError. Consult the matching
release of moi-python-sdk or
moi-go-sdk for the latest types
and signatures.