Dexwize Tenant Service
Tenant lifecycle, residency and privacy settings. Every request requires a bearer token issued by identity-service carrying tid (tenant), sub and role claims. Cross-tenant access returns 404, indistinguishable from a missing resource.
Version 1.0.0. Download the OpenAPI specification.
Authentication: bearer.
Operations
| Method | Path | Summary |
|---|---|---|
GET | /v1/internal/tenant-regions | Hosting region of every tenant for platform KPIs (operator-console only) |
POST | /v1/sandboxes | createSandboxTenant |
DELETE | /v1/sandboxes/{id} | removeSandboxTenant |
GET | /v1/tenants | List tenants: platform scope sees all (audited operator path); a partner admin sees only its own customers |
POST | /v1/tenants | Create a tenant |
GET | /v1/tenants/{id} | Get a tenant visible to the caller |
PUT | /v1/tenants/{id}/autonomy | Set remediation autonomy for the tenant and per action category (tenant admin, own tenant only, audited) |
PUT | /v1/tenants/{id}/privacy-mode | Set privacy mode (tenant admin, own tenant only) |
GET | /v1/tenants/{id}/sign-in-status | Lifecycle status for identity-service sign-in checks (workload role tenant_status_reader only) |
POST | /v1/tenants/{id}/suspend | Suspend a tenant (platform operator) |
GET | /v1/tenants/me | The caller's own tenant |
GET /v1/internal/tenant-regions
Hosting region of every tenant for platform KPIs (operator-console only)
Platform-level service token with the service-only role revenue_kpi_reader (operator-console, ADR-0050). The id, region and deployment model of each tenant; no names, partners or settings. Not routed through the gateway.
| Status | Description | Body |
|---|---|---|
| 200 | OK | object[] |
| 403 | Not a platform-level service token with revenue_kpi_reader |
POST /v1/sandboxes
An expiring sandbox tenant for an Academy lab (service token with lab_provisioner only). Sandboxes are SaaS tenants on the academy-lab plan and must expire within seven days.
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Created | object |
| 400 | Invalid name or lifetime |
DELETE /v1/sandboxes/{id}
Suspends a sandbox tenant. Tenants on any other plan are never touched (404).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 204 | Removed | |
| 404 | Not a sandbox |
GET /v1/tenants
List tenants: platform scope sees all (audited operator path); a partner admin sees only its own customers
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
status | query | string | no | |
partnerId | query | string | no | |
q | query | string | no | Case-insensitive name contains (wildcards matched literally) |
offset | query | integer | no | |
limit | query | integer | no |
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 400 | Invalid filter | |
| 401 | Missing or invalid token | |
| 403 | Not a platform-scope operator or a partner admin with a partner claim |
POST /v1/tenants
Create a tenant
Platform operators may create any tenant; partner admins only under their own partner id.
Request body: CreateTenantRequest (JSON).
| Status | Description | Body |
|---|---|---|
| 201 | Created | Tenant |
| 400 | Validation failed | |
| 401 | Missing or invalid token | |
| 403 | Caller may not create this tenant |
GET /v1/tenants/{id}
Get a tenant visible to the caller
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | Tenant |
| 401 | Missing or invalid token | |
| 404 | Not found or not visible to the caller |
PUT /v1/tenants/{id}/autonomy
Set remediation autonomy for the tenant and per action category (tenant admin, own tenant only, audited)
Each category level must be at most maxAutonomy. Air-gapped tenants cannot be Autonomous.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Updated | Tenant |
| 400 | Unknown level, malformed category or a category above maxAutonomy | |
| 403 | Missing TenantManage | |
| 404 | Not found or not the caller's tenant |
PUT /v1/tenants/{id}/privacy-mode
Set privacy mode (tenant admin, own tenant only)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body: object (JSON).
| Status | Description | Body |
|---|---|---|
| 200 | Updated | Tenant |
| 403 | Missing privacy settings permission | |
| 404 | Not found or not the caller's tenant |
GET /v1/tenants/{id}/sign-in-status
Lifecycle status for identity-service sign-in checks (workload role tenant_status_reader only)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | OK | object |
| 403 | Missing TenantStatusRead | |
| 404 | Unknown tenant |
POST /v1/tenants/{id}/suspend
Suspend a tenant (platform operator)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | Suspended | Tenant |
| 403 | Not a platform operator | |
| 404 | Not found | |
| 409 | Tenant is not active |
GET /v1/tenants/me
The caller's own tenant
| Status | Description | Body |
|---|---|---|
| 200 | OK | Tenant |
| 401 | Missing or invalid token | |
| 403 | Missing tenant read permission |