Skip to main content

io.enterpriseai.resources.PluginsClient

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/PluginsClient.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 PluginsClient​

Plugins and installation.

Constructor PluginsClient​

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

PluginsClient.create​

JsonNode create(Object body)

Register a plugin. Applies a Plugin manifest: creates the plugin or updates it (back to registered, a blocked plugin stays blocked), with the signature verified and stored. Refused: 422 pack_requires_marketplace for a pack, 422 invalid_manifest when the oci_ref digest differs from artifact.digest, an allow list is missing for egress_allowlist or the limits exceed the platform maximum (4 CPU, 8Gi memory, 3600 s, 1 GPU); 409 plugin_installed while installed. Needs tenant_admin, developer or application_owner; the caller becomes ReBAC owner. Audited as plugin.apply.

Route: /v1/plugins (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesPlugin manifest (kind: Plugin, metadata, spec with description, artifact, signature and sandbox).

Returns: JsonNode. Decoded JSON answer of the operation "Register a plugin".

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

PluginsClient.create​

JsonNode create(Object body, RequestOptions options)

Register a plugin. Applies a Plugin manifest: creates the plugin or updates it (back to registered, a blocked plugin stays blocked), with the signature verified and stored. Refused: 422 pack_requires_marketplace for a pack, 422 invalid_manifest when the oci_ref digest differs from artifact.digest, an allow list is missing for egress_allowlist or the limits exceed the platform maximum (4 CPU, 8Gi memory, 3600 s, 1 GPU); 409 plugin_installed while installed. Needs tenant_admin, developer or application_owner; the caller becomes ReBAC owner. Audited as plugin.apply.

Route: /v1/plugins (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesPlugin manifest (kind: Plugin, metadata, spec with description, artifact, signature and sandbox).
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Register a plugin".

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

PluginsClient.get​

JsonNode get(String name)

Get a plugin. Returns the plugin with its manifest, verification result and rendered deployment. Needs the ReBAC relation viewer. 404 plugin_not_found.

Route: /v1/plugins/{name} (GET).

NameTypeDefaultRequiredDescription
nameStringyesName of the plugin.

Returns: JsonNode. Decoded JSON answer of the operation "Get a plugin".

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

PluginsClient.install​

JsonNode install(String name)

Install a plugin. Installs the plugin in its sandbox. Needs tenant_admin and the ReBAC relation owner. Steps: 1. A blocked plugin answers 403 plugin_blocked; an installed one is returned as is. 2. The signature is verified again (403 plugin_unsigned when it fails, audited as a denial). 3. The Deployment (runtime class of the sandbox, read-only root file system by default) and the NetworkPolicy are rendered, then applied when Kubernetes is configured (status: failed with the error if the apply fails). Returns the runtime status. Audited as plugin.install.

Route: /v1/plugins/{name}/install (POST).

NameTypeDefaultRequiredDescription
nameStringyesName of the plugin.

Returns: JsonNode. Decoded JSON answer of the operation "Install a plugin".

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

PluginsClient.list​

Page<JsonNode> list()

List the plugins. Plugins of the tenant in name order, with version, digest, verification and status. One page only.

Route: /v1/plugins (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).

PluginsClient.status​

JsonNode status(String name)

Get the runtime status of a plugin. Runtime view: status, verified flag, digest, install date, runtime class, whether the objects were rendered or applied to Kubernetes, the Deployment and NetworkPolicy and the last error. Needs the ReBAC relation viewer.

Route: /v1/plugins/{name}/status (GET).

NameTypeDefaultRequiredDescription
nameStringyesName of the plugin.

Returns: JsonNode. Decoded JSON answer of the operation "Get the runtime status of a plugin".

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

PluginsClient.uninstall​

JsonNode uninstall(String name)

Uninstall a plugin. Deletes the Deployment and the NetworkPolicy from Kubernetes when configured (502 upstream_error on failure) and sets the plugin to uninstalled. Only an installed, installing or failed plugin (else 409 plugin_not_installed). Needs tenant_admin and the ReBAC relation owner. Audited as plugin.uninstall.

Route: /v1/plugins/{name}/uninstall (POST).

NameTypeDefaultRequiredDescription
nameStringyesName of the plugin.

Returns: JsonNode. Decoded JSON answer of the operation "Uninstall a plugin".

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