Skip to main content

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.

note

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.

NameTypeDefaultRequiredDescription
transportTransportyesTransport 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).

NameTypeDefaultRequiredDescription
bodyObjectyesSlug, 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).

NameTypeDefaultRequiredDescription
bodyObjectyesSlug, name, residency, settings and first administrators of the tenant.
optionsRequestOptionsyesPer 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).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (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).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery 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).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the tenant.
bodyObjectyesFields 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).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the tenant.
bodyObjectyesFields to change; omitted fields keep their value.
optionsRequestOptionsyesPer 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).