io.enterpriseai.resources.OrganizationsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/OrganizationsClient.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 OrganizationsClient
Organizations of the tenant (tenant hierarchy, ADR-0156). PATCH with expected_version is optimistic.
Constructor OrganizationsClient
OrganizationsClient(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. |
OrganizationsClient.create
JsonNode create(Object body)
Create an organization. Creates an organization in the tenant. Needs tenant_admin. A slug already used answers 409 conflict. Writes the audit event organization.create.
Route: /v1/organizations (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, description and metadata of the organization. |
Returns: JsonNode. Decoded JSON answer of the operation "Create an organization".
Raises: the typed errors of the transport (Errors).
OrganizationsClient.create
JsonNode create(Object body, RequestOptions options)
Create an organization. Creates an organization in the tenant. Needs tenant_admin. A slug already used answers 409 conflict. Writes the audit event organization.create.
Route: /v1/organizations (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, description and metadata of the organization. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create an organization".
Raises: the typed errors of the transport (Errors).
OrganizationsClient.list
Page<JsonNode> list()
List the organizations. Lists the organizations of the tenant, paginated. Open to any member of the tenant.
Route: /v1/organizations (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).
OrganizationsClient.list
Page<JsonNode> list(Map<String, ?> query)
List the organizations. Lists the organizations of the tenant, paginated. Open to any member of the tenant.
Route: /v1/organizations (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).
OrganizationsClient.update
JsonNode update(String organizationId, Object body)
Update an organization. Changes the name, description, status (active or archived) or metadata of an organization. Needs tenant_admin. Send expected_version to detect a concurrent change (409 version_conflict). Writes the audit event organization.update.
Route: /v1/organizations/{organization_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
organizationId | String | yes | Identifier (UUID) of the organization. | |
body | Object | yes | Fields to change; omitted fields keep their value. |
Returns: JsonNode. Decoded JSON answer of the operation "Update an organization".
Raises: the typed errors of the transport (Errors).
OrganizationsClient.update
JsonNode update(String organizationId, Object body, RequestOptions options)
Update an organization. Changes the name, description, status (active or archived) or metadata of an organization. Needs tenant_admin. Send expected_version to detect a concurrent change (409 version_conflict). Writes the audit event organization.update.
Route: /v1/organizations/{organization_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
organizationId | String | yes | Identifier (UUID) of the organization. | |
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 an organization".
Raises: the typed errors of the transport (Errors).