Tenant Management
- GET /admin/tenants
List tenants
Retrieve a paginated list of all tenants from the local database
- Query Parameters:
page (integer) – Page number (default: 1)
page_size (integer) – Page size (default: 50, max: 500)
- Status Codes:
200 OK – List of tenants
500 Internal Server Error – Internal server error
- POST /admin/tenants
Create tenant
Create a new tenant in CloudStack and register it locally. A domain-admin CloudStack account is automatically created for the tenant.
- Request JSON Object:
domain_uuid (string) – Optional: domain UUID for adding domain from another region
end_ip (string)
gateway (string)
name (string) – Required: creates domain with this name (required)
netmask (string)
network_domain (string) – Optional: network domain for networks in the domain
start_ip (string)
zone_id (string) – Optional: if any of these are set, all five must be provided to provision a dedicated public IP range at creation time.
- Status Codes:
201 Created – Tenant created successfully with admin account credentials
400 Bad Request – Invalid request
409 Conflict – Tenant with this name already exists
500 Internal Server Error – Internal server error or CloudStack API failure
- GET /admin/tenants/is-multi-tenant
Check multi-tenant mode
Returns true if at least one tenant (child domain under ROOT) exists in CloudStack
- Status Codes:
200 OK – Multi-tenant status
500 Internal Server Error – Internal server error
- GET /admin/tenants/stats
Get tenant statistics
Returns counts for total, active, inactive, onboarded, partially onboarded, and billable tenants.
- Status Codes:
200 OK – OK
500 Internal Server Error – Internal server error
- Response JSON Object:
active (integer)
billable (integer)
fully_onboarded (integer)
inactive (integer)
partially_onboarded (integer)
total (integer)
- DELETE /admin/tenants/{id}
Delete tenant
Delete a tenant domain from CloudStack (with full cleanup) and remove its local record.
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Status Codes:
200 OK – Tenant deleted successfully
400 Bad Request – Invalid request
404 Not Found – Tenant not found
500 Internal Server Error – Internal server error or CloudStack API failure
- GET /admin/tenants/{id}
Get tenant
Retrieve tenant details by ID
- Parameters:
id (string) – Tenant ID
- Status Codes:
200 OK – Tenant details
404 Not Found – Tenant not found
500 Internal Server Error – Internal server error
- Response JSON Object:
dedicated_ip_end (string)
dedicated_ip_start (string) – Populated on creation when TENANT_IP_POOL_BASE is configured.
dedicated_vlan_id (string)
description (string)
id (string)
is_active (boolean)
name (string)
- GET /admin/tenants/{id}/limits
Get tenant limits
Get all resource quotas currently set on a tenant domain
- Parameters:
id (string) – Tenant ID
- Status Codes:
200 OK – Resource limits
400 Bad Request – Invalid request
500 Internal Server Error – Internal server error
- PUT /admin/tenants/{id}/limits
Configure tenant limits
Set per-resource quotas for a tenant. Omit fields to leave unchanged. Use -1 for unlimited.
- Parameters:
id (string) – Tenant ID
- Request JSON Object:
cpus (integer)
instances (integer)
ips (integer)
memory (integer)
networks (integer)
primary_storage (integer)
projects (integer)
secondary_storage (integer)
snapshots (integer)
templates (integer)
volumes (integer)
vpcs (integer)
- Status Codes:
200 OK – Updated limits
400 Bad Request – Invalid request
500 Internal Server Error – Internal server error
- GET /admin/tenants/{id}/network
Get tenant network
Retrieve the dedicated public IP range assigned to a tenant
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Status Codes:
200 OK – Network configuration
404 Not Found – Tenant or network not found
500 Internal Server Error – Internal server error
- Response JSON Object:
dedicated_at (string)
end_ip (string)
gateway (string)
netmask (string)
start_ip (string)
status (string)
tenant_id (string)
tenant_name (string)
vlan_range_id (string) – CS-generated UUID
zone_id (string)
- POST /admin/tenants/{id}/network
Assign network to tenant
Dedicate a pre-existing public IP range to the tenant in CloudStack and record it.
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Request JSON Object:
end_ip (string) – (required)
gateway (string) – (required)
netmask (string) – (required)
start_ip (string) – (required)
zone_id (string) – (required)
- Status Codes:
201 Created – Network assigned
400 Bad Request – Invalid request
404 Not Found – Tenant not found
409 Conflict – Tenant already has a network assigned
500 Internal Server Error – Internal server error
- Response JSON Object:
dedicated_at (string)
end_ip (string)
gateway (string)
netmask (string)
start_ip (string)
status (string)
tenant_id (string)
tenant_name (string)
vlan_range_id (string) – CS-generated UUID
zone_id (string)
- PUT /admin/tenants/{id}/status
Toggle tenant active status
Activate or deactivate a tenant and perform associated side-effects
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Request JSON Object:
is_active (boolean) – (required)
- Status Codes:
200 OK – Updated status
400 Bad Request – Invalid request
404 Not Found – Tenant not found
500 Internal Server Error – Internal server error
- Response JSON Object:
is_active (boolean)
message (string)
tenant_id (string)
- POST /tenants/{id}/account-mode
Set tenant account mode
Set the CloudStack account provisioning mode: “flat” (all users in one account) or
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Request JSON Object:
account_mode (string) – “flat” or “departmental” (required)
- Status Codes:
200 OK – Account mode updated
400 Bad Request – Invalid request or invalid account_mode value
404 Not Found – Tenant not found
409 Conflict – Tenant auth_source is not ldap
- POST /tenants/{id}/auth-source
Set tenant auth source
Switch the tenant authentication source between “local” and “ldap”.
- Parameters:
id (string) – Tenant ID (CloudStack domain UUID)
- Request JSON Object:
auth_source (string) – “local” | “ldap” | “oidc” | “saml” (required)
- Status Codes:
200 OK – Auth source updated
400 Bad Request – Invalid request
404 Not Found – Tenant not found
409 Conflict – LDAP config required when switching to ldap