io.enterpriseai.resources.HeartbeatsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/HeartbeatsClient.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 HeartbeatsClient
Run heartbeats and stale run detection.
Constructor HeartbeatsClient
HeartbeatsClient(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. |
HeartbeatsClient.beat
JsonNode beat(String runId, Object body)
Send a run heartbeat. Records that the runtime is alive and tells it whether to go on: action is continue, or stop with a reason (run_cancelled, run_terminal, run_suspended, agent_killed, agent_suspended). The answer also gives stale_after_seconds. A terminal run is not updated. Needs tenant_admin, developer or agent. Audited only for the first heartbeat of a run and when the runtime is told to stop.
Route: /v1/runs/{run_id}/heartbeat (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
runId | String | yes | Identifier (UUID) of the run. | |
body | Object | yes | Optional progress information. |
Returns: JsonNode. Decoded JSON answer of the operation "Send a run heartbeat".
Raises: the typed errors of the transport (Errors).
HeartbeatsClient.beat
JsonNode beat(String runId, Object body, RequestOptions options)
Send a run heartbeat. Records that the runtime is alive and tells it whether to go on: action is continue, or stop with a reason (run_cancelled, run_terminal, run_suspended, agent_killed, agent_suspended). The answer also gives stale_after_seconds. A terminal run is not updated. Needs tenant_admin, developer or agent. Audited only for the first heartbeat of a run and when the runtime is told to stop.
Route: /v1/runs/{run_id}/heartbeat (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
runId | String | yes | Identifier (UUID) of the run. | |
body | Object | yes | Optional progress information. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Send a run heartbeat".
Raises: the typed errors of the transport (Errors).
HeartbeatsClient.stale
JsonNode stale()
List run heartbeats. Liveness of the runs expected to send heartbeats (running and waiting_input). By default only the stale ones (no heartbeat within the threshold) are returned, with active, stale_count and stale_after_seconds. With format=prometheus the answer is Prometheus exposition text (eai_runs_total, eai_runs_active, eai_runs_stale, eai_heartbeat_stale_threshold_seconds).
Route: /v1/heartbeats (GET).
This element takes no parameter.
Returns: JsonNode. Decoded JSON answer of the operation "List run heartbeats".
Raises: the typed errors of the transport (Errors).
HeartbeatsClient.stale
JsonNode stale(Map<String, ?> query)
List run heartbeats. Liveness of the runs expected to send heartbeats (running and waiting_input). By default only the stale ones (no heartbeat within the threshold) are returned, with active, stale_count and stale_after_seconds. With format=prometheus the answer is Prometheus exposition text (eai_runs_total, eai_runs_active, eai_runs_stale, eai_heartbeat_stale_threshold_seconds).
Route: /v1/heartbeats (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | Map<String, ?> | yes | Query string parameters of the route. |
Returns: JsonNode. Decoded JSON answer of the operation "List run heartbeats".
Raises: the typed errors of the transport (Errors).