io.enterpriseai.resources.ChannelsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/ChannelsClient.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 ChannelsClient
Channels (message in, run out).
Constructor ChannelsClient
ChannelsClient(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. |
ChannelsClient.create
JsonNode create(Object body)
Create or update a channel. Applies a Channel manifest (apply_status: created or updated); project (id or slug, default the X-Project header) attaches it to a project, and a channel of another project is never taken over (409 channel_project_conflict). The agent_ref agent must exist (404 agent_not_found); signed_webhook needs auth.secret_ref (422 invalid_manifest). Needs tenant_admin, developer or application_owner. Audited as channel.apply.
Route: /v1/channels (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Channel manifest (kind: Channel, metadata, spec with type, agent, auth, limits, DLP and sessions). |
Returns: JsonNode. Decoded JSON answer of the operation "Create or update a channel".
Raises: the typed errors of the transport (Errors).
ChannelsClient.create
JsonNode create(Object body, RequestOptions options)
Create or update a channel. Applies a Channel manifest (apply_status: created or updated); project (id or slug, default the X-Project header) attaches it to a project, and a channel of another project is never taken over (409 channel_project_conflict). The agent_ref agent must exist (404 agent_not_found); signed_webhook needs auth.secret_ref (422 invalid_manifest). Needs tenant_admin, developer or application_owner. Audited as channel.apply.
Route: /v1/channels (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Channel manifest (kind: Channel, metadata, spec with type, agent, auth, limits, DLP and sessions). | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create or update a channel".
Raises: the typed errors of the transport (Errors).
ChannelsClient.delete
void delete(String name)
Delete a channel. Deletes the channel. Needs tenant_admin. 404 channel_not_found. Audited as channel.delete.
Route: /v1/channels/{name} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. |
Returns: void.
Raises: the typed errors of the transport (Errors).
ChannelsClient.get
JsonNode get(String name)
Get a channel. Returns the channel with its manifest, type, agent, status, project and preset. 404 channel_not_found.
Route: /v1/channels/{name} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a channel".
Raises: the typed errors of the transport (Errors).
ChannelsClient.inbound
JsonNode inbound(String name, Object body)
Post an inbound message. Delivers a message from an end user (202) and returns session_id, session_created, message_id, run_id (or run_skipped when the agent is not active) and the DLP result. Needs tenant_admin, developer or agent. Steps: 1. The channel must be active (409 channel_disabled); a signed_webhook channel checks X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>, 5 minute window; 401 invalid_signature). 2. The policy channel.inbound is evaluated; size (413 message_too_large) and rate per user (429 rate_limited) are checked. 3. Inbound DLP runs (default detect; block answers 403 dlp_blocked, mask stores the masked text). 4. The open session of the user and conversation is reused, or a new one opened (429 too_many_sessions, 409 session_closed past max_session_minutes). 5. The message is added and a run of the channel agent starts with trigger channel.
Route: /v1/channels/{name}/inbound (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. | |
body | Object | yes | JSON message: text (1 to 1000000 characters, required), user (external user id, up to 300 characters; default the caller), conversation_id (up to 300 characters; default the user) and metadata (kept with the message). The raw bytes are used for the signature check. |
Returns: JsonNode. Decoded JSON answer of the operation "Post an inbound message".
Raises: the typed errors of the transport (Errors).
ChannelsClient.inbound
JsonNode inbound(String name, Object body, RequestOptions options)
Post an inbound message. Delivers a message from an end user (202) and returns session_id, session_created, message_id, run_id (or run_skipped when the agent is not active) and the DLP result. Needs tenant_admin, developer or agent. Steps: 1. The channel must be active (409 channel_disabled); a signed_webhook channel checks X-EAI-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>." + raw body>, 5 minute window; 401 invalid_signature). 2. The policy channel.inbound is evaluated; size (413 message_too_large) and rate per user (429 rate_limited) are checked. 3. Inbound DLP runs (default detect; block answers 403 dlp_blocked, mask stores the masked text). 4. The open session of the user and conversation is reused, or a new one opened (429 too_many_sessions, 409 session_closed past max_session_minutes). 5. The message is added and a run of the channel agent starts with trigger channel.
Route: /v1/channels/{name}/inbound (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. | |
body | Object | yes | JSON message: text (1 to 1000000 characters, required), user (external user id, up to 300 characters; default the caller), conversation_id (up to 300 characters; default the user) and metadata (kept with the message). The raw bytes are used for the signature check. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Post an inbound message".
Raises: the typed errors of the transport (Errors).
ChannelsClient.list
Page<JsonNode> list()
List the channels. Channels of the tenant in name order; project (id or slug) keeps the channels of that project only (404 project_not_found). One page only.
Route: /v1/channels (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).
ChannelsClient.listByProject
Page<JsonNode> listByProject(String project)
List the channels. Channels of the tenant in name order; project (id or slug) keeps the channels of that project only (404 project_not_found). One page only.
Route: /v1/channels (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
project | String | yes | Identifier (UUID) or slug of the project whose channels are listed. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ChannelsClient.sessions
Page<JsonNode> sessions(String name)
List the sessions of a channel. Sessions opened on the channel, most recently updated first, at most 500.
Route: /v1/channels/{name}/sessions (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. |
Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).
Raises: the typed errors of the transport (Errors).
ChannelsClient.update
JsonNode update(String name, Object body)
Update a channel. Changes the status (active or disabled; a disabled channel refuses inbound messages) or the owner. Needs tenant_admin, developer or application_owner. Audited as channel.update.
Route: /v1/channels/{name} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. | |
body | Object | yes | Fields to change; the omitted ones are kept. |
Returns: JsonNode. Decoded JSON answer of the operation "Update a channel".
Raises: the typed errors of the transport (Errors).
ChannelsClient.update
JsonNode update(String name, Object body, RequestOptions options)
Update a channel. Changes the status (active or disabled; a disabled channel refuses inbound messages) or the owner. Needs tenant_admin, developer or application_owner. Audited as channel.update.
Route: /v1/channels/{name} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | String | yes | Name of the channel. | |
body | Object | yes | Fields to change; the omitted ones are kept. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Update a channel".
Raises: the typed errors of the transport (Errors).