Skip to main content

io.enterpriseai.resources.TriggersClient

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

Event triggers.

Constructor TriggersClient​

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

TriggersClient.create​

JsonNode create(Object body)

Create a trigger. Starts a run of the agent for every published event whose subject matches (NATS wildcards * and > allowed) and whose payload passes the filter. Needs tenant_admin, developer or application_owner. 422 invalid_subject or invalid_filter; 404 agent_not_found. Audited as trigger.create.

Route: /v1/triggers (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAgent, subject and optional payload filter.

Returns: JsonNode. Decoded JSON answer of the operation "Create a trigger".

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

TriggersClient.create​

JsonNode create(Object body, RequestOptions options)

Create a trigger. Starts a run of the agent for every published event whose subject matches (NATS wildcards * and > allowed) and whose payload passes the filter. Needs tenant_admin, developer or application_owner. 422 invalid_subject or invalid_filter; 404 agent_not_found. Audited as trigger.create.

Route: /v1/triggers (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAgent, subject and optional payload filter.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Create a trigger".

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

TriggersClient.delete​

void delete(String id)

Delete a trigger. Deletes the event trigger; matching events no longer start runs. Needs tenant_admin, developer or application_owner. 404 trigger_not_found. Audited as trigger.delete.

Route: /v1/triggers/{trigger_id} (DELETE).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the trigger.

Returns: void.

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

TriggersClient.list​

Page<JsonNode> list()

List the triggers. Event triggers of the tenant, oldest first: agent, subject and filter. One page only.

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