Skip to main content

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.

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 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.

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

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

NameTypeDefaultRequiredDescription
bodyObjectyesSlug, name, description and metadata of the organization.
optionsRequestOptionsyesPer 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).

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

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

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

NameTypeDefaultRequiredDescription
organizationIdStringyesIdentifier (UUID) of the organization.
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 an organization".

Raises: the typed errors of the transport (Errors).