io.enterpriseai.resources.ProjectsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/ProjectsClient.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 ProjectsClient
Projects and their environments.
Constructor ProjectsClient
ProjectsClient(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. |
ProjectsClient.create
JsonNode create(Object body)
Create a project. Creates a project in the tenant of the caller. Needs tenant_admin.
Route: /v1/projects (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, settings, environments and attachment of the project. |
Returns: JsonNode. Decoded JSON answer of the operation "Create a project".
Raises: the typed errors of the transport (Errors).
ProjectsClient.create
JsonNode create(Object body, RequestOptions options)
Create a project. Creates a project in the tenant of the caller. Needs tenant_admin.
Route: /v1/projects (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Slug, name, settings, environments and attachment of the project. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create a project".
Raises: the typed errors of the transport (Errors).
ProjectsClient.createEnvironment
JsonNode createEnvironment(String id, Object body)
Create an environment. Adds an environment (dev, test, staging or prod) to the project. Needs tenant_admin and the relation editor on the project. An environment that already exists answers 409 conflict. Writes the audit event environment.create.
Route: /v1/projects/{project_id}/environments (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. | |
body | Object | yes | Name and settings of the environment. |
Returns: JsonNode. Decoded JSON answer of the operation "Create an environment".
Raises: the typed errors of the transport (Errors).
ProjectsClient.createEnvironment
JsonNode createEnvironment(String id, Object body, RequestOptions options)
Create an environment. Adds an environment (dev, test, staging or prod) to the project. Needs tenant_admin and the relation editor on the project. An environment that already exists answers 409 conflict. Writes the audit event environment.create.
Route: /v1/projects/{project_id}/environments (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. | |
body | Object | yes | Name and settings of the environment. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create an environment".
Raises: the typed errors of the transport (Errors).
ProjectsClient.delete
void delete(String id)
Delete a project. Deletes the project and its environments. Needs tenant_admin and the relation owner on the project (403 relation_required). Objects that still reference the project may block the deletion (409 conflict). Writes the audit event project.delete. Answers 204.
Route: /v1/projects/{project_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. |
Returns: void.
Raises: the typed errors of the transport (Errors).
ProjectsClient.get
JsonNode get(String id)
Get a project. Returns the project with its environments. Needs the relation viewer on the project (403 relation_required, audited). Answers 404 not_found for an unknown project.
Route: /v1/projects/{project_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a project".
Raises: the typed errors of the transport (Errors).
ProjectsClient.list
Page<JsonNode> list()
List the projects. Lists the projects of the tenant ordered by slug, paginated, optionally filtered by organization or business unit. Open to any member of the tenant.
Route: /v1/projects (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).
ProjectsClient.list
Page<JsonNode> list(Map<String, ?> query)
List the projects. Lists the projects of the tenant ordered by slug, paginated, optionally filtered by organization or business unit. Open to any member of the tenant.
Route: /v1/projects (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).
ProjectsClient.listEnvironments
Page<JsonNode> listEnvironments(String id)
List the environments of a project. Lists the environments of the project, ordered by name. Needs the relation viewer on the project. Not paginated: next_cursor is always null.
Route: /v1/projects/{project_id}/environments (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ProjectsClient.update
JsonNode update(String id, Object body)
Update a project. Changes the name, description, settings, metadata or attachment of a project. Sending organization_id or business_unit_id as null detaches the project. The unit must belong to the organization (422 invalid_hierarchy). Needs tenant_admin and the relation editor on the project. Send expected_version to detect a concurrent change (409 version_conflict). Writes the audit event project.update.
Route: /v1/projects/{project_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. | |
body | Object | yes | Fields to change; omitted fields keep their value. |
Returns: JsonNode. Decoded JSON answer of the operation "Update a project".
Raises: the typed errors of the transport (Errors).
ProjectsClient.update
JsonNode update(String id, Object body, RequestOptions options)
Update a project. Changes the name, description, settings, metadata or attachment of a project. Sending organization_id or business_unit_id as null detaches the project. The unit must belong to the organization (422 invalid_hierarchy). Needs tenant_admin and the relation editor on the project. Send expected_version to detect a concurrent change (409 version_conflict). Writes the audit event project.update.
Route: /v1/projects/{project_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
id | String | yes | Identifier (UUID) of the project. | |
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 project".
Raises: the typed errors of the transport (Errors).