io.enterpriseai.resources.TenantsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/TenantsClient.java. Back to the Java SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Class TenantsClient
Tenants (platform_admin).
Constructor TenantsClient
TenantsClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
TenantsClient.create
JsonNode create(Object body)
Create a tenant. Creates a tenant and makes each subject of admins its tenant_admin. Needs platform_admin. A slug already used answers 409 conflict. Writes the audit event tenant.create in the chain of the new tenant.
Route: /v1/tenants (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, residency, settings and first administrators of the tenant. |
Returns: JsonNode. Decoded JSON answer of the operation "Create a tenant".
Raises: the typed errors of the transport (Errors).
TenantsClient.create
JsonNode create(Object body, RequestOptions options)
Create a tenant. Creates a tenant and makes each subject of admins its tenant_admin. Needs platform_admin. A slug already used answers 409 conflict. Writes the audit event tenant.create in the chain of the new tenant.
Route: /v1/tenants (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, residency, settings and first administrators of the tenant. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create a tenant".
Raises: the typed errors of the transport (Errors).
TenantsClient.get
JsonNode get(String id)
Get a tenant. Returns one tenant: slug, name, status, data residency and settings. A tenant the caller may not see answers 404 not_found.
Route: /v1/tenants/{tenant_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the tenant. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a tenant".
Raises: the typed errors of the transport (Errors).
TenantsClient.list
Page<JsonNode> list()
List the tenants. Lists the tenants the caller may see, ordered by slug, paginated: their own tenant for a tenant credential, every tenant for a platform administrator.
Route: /v1/tenants (GET).
This element takes no parameter.
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
TenantsClient.list
Page<JsonNode> list(Map<String, ?> query)
List the tenants. Lists the tenants the caller may see, ordered by slug, paginated: their own tenant for a tenant credential, every tenant for a platform administrator.
Route: /v1/tenants (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | Map<String, ?> | yes | Query string parameters of the route. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
TenantsClient.update
JsonNode update(String id, Object body)
Update a tenant. Changes the name, data residency, settings or status of a tenant. Needs tenant_admin; changing status (active or suspended) needs a platform administrator (403 forbidden). A suspended tenant answers 403 tenant_suspended to every credential. Writes the audit event tenant.update.
Route: /v1/tenants/{tenant_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the tenant. | |
body | Object | yes | Fields to change; omitted fields keep their value. |
Returns: JsonNode. Decoded JSON answer of the operation "Update a tenant".
Raises: the typed errors of the transport (Errors).
TenantsClient.update
JsonNode update(String id, Object body, RequestOptions options)
Update a tenant. Changes the name, data residency, settings or status of a tenant. Needs tenant_admin; changing status (active or suspended) needs a platform administrator (403 forbidden). A suspended tenant answers 403 tenant_suspended to every credential. Writes the audit event tenant.update.
Route: /v1/tenants/{tenant_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the tenant. | |
body | Object | yes | Fields to change; omitted fields keep their value. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Update a tenant".
Raises: the typed errors of the transport (Errors).