The
organizations client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.Get, Update, Delete, AddUser, and RemoveUser methods accept either an organization name or an ID — the SDK resolves names to IDs on your behalf.
List Organizations
List returns a paginated list of organizations.
Signature:
Get an Organization
Get returns a single organization, resolving by name or ID.
Signature:
Create an Organization
Create issues a POST to create a new organization and returns the created organization.
Signature:
Update an Organization
Update modifies an existing organization, resolving the target by name or ID, and returns the updated organization. Name and Description are pointers — nil preserves the existing value, a pointer to an empty string clears the field.
Signature:
Delete an Organization
Delete irreversibly removes an organization and cascades to all child resources (spaces, projects, API keys, datasets, monitors, etc.). It returns only an error.
Signature:
Add a User to an Organization
AddUser adds a user to an organization, or upserts their role if they are already a member. Pass a PredefinedOrgRole built from one of the OrganizationRole* constants; custom role assignments are not yet supported for organizations.
Signature:
Remove a User from an Organization
RemoveUser removes a user from an organization. Membership removal cascades to all child spaces.
Signature: