Skip to main content

io.enterpriseai.interfaces.SdkInterfaces

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

The sixteen interfaces of the architecture reference (section B9.3) over documented Control Plane routes. Rule: an allow is only reported when the server answered an explicit boolean; every error propagates. Usage: SdkInterfaces api = SdkInterfaces.of(client); api.authz().checkBatch(...).

Constructor SdkInterfaces​

SdkInterfaces(Transport t)

Private constructor: the instance is created with SdkInterfaces.of(client).

NameTypeDefaultRequiredDescription
tTransportyesTransport of the client, taken from client.transport().

SdkInterfaces.agent​

Agent agent()

Agent interface: agent runs: start, cancel, checkpoint and resume.

This element takes no parameter.

Returns: Agent. A Agent: Agents. Registry of the tenant's agents and the server side execution of their runs: steps, budgets, checkpoints, heartbeats, sub-agents, agent to agent (A2A) messages, conversation sessions, cron schedules, event triggers and sandbox executions.

SdkInterfaces.approval​

Approval approval()

Approval interface: human approvals: request, check and cancel.

This element takes no parameter.

Returns: Approval. A Approval: Approvals. Human in the loop: approval requests for sensitive actions, with separation of duties, quorum and expiry. Agent runs that reach a tool needing approval, promotions of models, agents, tools, skills, MCP servers or plugins, break glass grants and mandates all create approval requests here.

SdkInterfaces.audit​

Audit audit()

Audit interface: audit trail: query, evidence verification and application events.

This element takes no parameter.

Returns: Audit. A new Audit instance on the transport of the client.

SdkInterfaces.authz​

Authz authz()

Authz interface: relation checks with a confirmed decision, never a default allow.

This element takes no parameter.

Returns: Authz. A new Authz instance on the transport of the client.

SdkInterfaces.delegation​

Delegation delegation()

Delegation interface: delegation chains: create, verify, restrict and revoke.

This element takes no parameter.

Returns: Delegation. A new Delegation instance on the transport of the client.

SdkInterfaces.finops​

Finops finops()

Finops interface: budget check, quota reservation and usage recording.

This element takes no parameter.

Returns: Finops. A Finops: FinOps. Cost management of AI usage: price cards, usage events, estimates, quotas and reservations, GPU cost allocation, billing reconciliation and alerts.

SdkInterfaces.identity​

Identity identity()

Identity interface: identity of the caller, verification of execution contexts and service identity assumption.

This element takes no parameter.

Returns: Identity. A new Identity instance on the transport of the client.

SdkInterfaces.llm​

Llm llm()

Llm interface: model calls through the AI Gateway: chat, SSE stream, embeddings and vision.

This element takes no parameter.

Returns: Llm. A new Llm instance on the transport of the client.

SdkInterfaces.mcp​

Mcp mcp()

Mcp interface: mCP servers through the JSON-RPC gateway: initialize, list tools and call a tool.

This element takes no parameter.

Returns: Mcp. A Mcp: MCP gateway. Registry of the upstream MCP servers (Model Context Protocol) and the MCP Gateway, a JSON-RPC 2.0 proxy that applies the platform controls to every call: project isolation, allowed callers, allow lists of tools and resources, scopes, DLP, policy, quota, prompt injection screening, metering and audit.

SdkInterfaces.privacy​

Privacy privacy()

Privacy interface: dLP detection and masking, tokenization and encryption.

This element takes no parameter.

Returns: Privacy. A Privacy: Privacy and data protection. Data protection services of the tenant: classification, DLP (data loss prevention), tokenization and envelope encryption.

SdkInterfaces.rag​

Rag rag()

Rag interface: knowledge bases: ingestion, search, ACL filtered results and citations.

This element takes no parameter.

Returns: Rag. A Rag: Knowledge bases. Knowledge bases for retrieval augmented generation (RAG): documents are scanned, extracted, screened for personal data and poisoning, chunked, embedded through the Model Gateway and searched with ACL and clearance filters.

SdkInterfaces.security​

Security security()

Security interface: security posture, incident report and run cancellation.

This element takes no parameter.

Returns: Security. A new Security instance on the transport of the client.

SdkInterfaces.storage​

Storage storage()

Storage interface: objects of a storage profile: presigned URLs, listing, deletion and verification.

This element takes no parameter.

Returns: Storage. A Storage: Storage. Storage profiles: the client buckets and containers the platform writes to (audit exports, evidence, documents, media, exports, backups), with their credential reference and their capabilities discovered by real calls.

SdkInterfaces.subagent​

Subagent subagent()

Subagent interface: subagent runs of a parent run: spawn, delegate and cancel.

This element takes no parameter.

Returns: Subagent. A Subagent: Agents. Registry of the tenant's agents and the server side execution of their runs: steps, budgets, checkpoints, heartbeats, sub-agents, agent to agent (A2A) messages, conversation sessions, cron schedules, event triggers and sandbox executions.

SdkInterfaces.tools​

Tools tools()

Tools interface: tool discovery, invocation and validation of a tool invocation.

This element takes no parameter.

Returns: Tools. A new Tools instance on the transport of the client.

SdkInterfaces.trace​

Trace trace()

Trace interface: client side spans sent to POST /v1/telemetry/spans.

This element takes no parameter.

Returns: Trace. A Trace: Telemetry. Traces, request journal, live stream and service level objectives (SLO) of the platform.

Class SdkInterfaces.Agent​

Agents. Registry of the tenant's agents and the server side execution of their runs: steps, budgets, checkpoints, heartbeats, sub-agents, agent to agent (A2A) messages, conversation sessions, cron schedules, event triggers and sandbox executions.

Agent.cancel​

JsonNode cancel(String runId)

Cancel a run. Moves the run to cancelled with the error cancelled; its active sub-agent runs are cancelled too. Needs tenant_admin, developer, agent or security_officer. A run already terminal answers 409 invalid_transition. Audited as run.transition.

Route: /v1/runs/{run_id}/cancel (POST).

NameTypeDefaultRequiredDescription
runIdStringyesIdentifier (UUID) of the run.

Returns: JsonNode. Decoded JSON answer of the operation "Cancel a run".

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

Agent.checkpoint​

JsonNode checkpoint(String runId, Object body)

Save a checkpoint. Saves a state of the run with the next sequence number and the current step sequence, so the run can later resume from it. Needs tenant_admin, developer or agent. Refused with 409 run_finished on a run succeeded or cancelled. Emits checkpoint.created; audited as run.checkpoint.

Route: /v1/runs/{run_id}/checkpoints (POST).

NameTypeDefaultRequiredDescription
runIdStringyesIdentifier (UUID) of the run.
bodyObjectyesState to save and optional label.

Returns: JsonNode. Decoded JSON answer of the operation "Save a checkpoint".

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

Agent.resume​

JsonNode resume(String runId, Object body)

Resume a run. Moves a suspended, failed, timed_out or waiting_input run back to running (else 409 invalid_transition). Needs tenant_admin, developer or agent; the agent must be active (409 agent_not_active). Strategies: 1. from_last_checkpoint (default, except for waiting_input): resume from checkpoint_id or the last checkpoint (409 no_checkpoint if none). 2. restart_step (default for waiting_input): replay the current step. 3. restart_run: start over with the budget consumption reset. A run that failed on budget_exceeded, max_steps_exceeded, killed or approval_rejected can only use restart_run (409 run_not_resumable). Returns the run and the checkpoint used.

Route: /v1/runs/{run_id}/resume (POST).

NameTypeDefaultRequiredDescription
runIdStringyesIdentifier (UUID) of the run.
bodyObjectyesOptional checkpoint and resume strategy.

Returns: JsonNode. Decoded JSON answer of the operation "Resume a run".

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

Agent.run​

JsonNode run(String agentId, Object body)

Start a run of an agent. Creates a run and returns its Execution Contract (201). Needs tenant_admin, developer or agent, the scope agents:run and the ReBAC relation can_invoke. Steps: 1. The agent must be active (else 409 agent_not_active, audited as a denial). 2. The policy agent.run is evaluated with the agent risk, owner, purpose and the data_classification of the task (403 policy_denied). 3. The budget is the manifest budget, tightened by budgets (a request can never loosen it; 422 invalid_budget). 4. The delegation and workload identity are attached, the run is created in pending (or running with start=true) and audited as run.create. A repeated Idempotency-Key returns the first run; the same key for another agent answers 409 idempotency_conflict. An unknown session_id answers 404 session_not_found.

Route: /v1/agents/{agent_id}/runs (POST).

NameTypeDefaultRequiredDescription
agentIdStringyesIdentifier (UUID) or name of the agent.
bodyObjectyesTask of the run, optional session, budget, retry policy and delegation.

Returns: JsonNode. Decoded JSON answer of the operation "Start a run of an agent".

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

Class SdkInterfaces.Approval​

Approvals. Human in the loop: approval requests for sensitive actions, with separation of duties, quorum and expiry. Agent runs that reach a tool needing approval, promotions of models, agents, tools, skills, MCP servers or plugins, break glass grants and mandates all create approval requests here.

Approval.cancel​

JsonNode cancel(String id, String reason)

Cancel an approval request. Withdraws a pending request. Allowed to its requester, a tenant_admin or a security_officer (403 forbidden otherwise, the refusal being audited). The request ends cancelled and its subject reacts as to a refusal: a waiting run fails (approval_cancelled), a pending break glass grant or mandate is rejected. A request that is no longer pending answers 409 approval_closed. Writes the audit event approval.cancel with the reason. The answer carries run_state when a run is attached.

Route: /v1/approvals/{approval_id}/cancel (POST).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the approval request.
reasonStringyesWhy the request is withdrawn, 3 to 2000 characters. Written to the audit trail.

Returns: JsonNode. Decoded JSON answer of the operation "Cancel an approval request".

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

Approval.check​

JsonNode check(String id)

Get an approval request. Returns one approval request with its decisions (approver, decision, comment, date) and approvals_count. A pending request past its expiry is marked expired and its waiting run is failed. Open to any member of the tenant. Answers 404 approval_not_found.

Route: /v1/approvals/{approval_id} (GET).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the approval request.

Returns: JsonNode. Decoded JSON answer of the operation "Get an approval request".

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

Approval.request​

JsonNode request(Object body)

Request an approval. Creates a pending approval request. Needs tenant_admin, developer, agent, security_officer or finops.

Route: /v1/approvals (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAction, resource, quorum, approvers and expiry of the request.

Returns: JsonNode. Decoded JSON answer of the operation "Request an approval".

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

Class SdkInterfaces.Audit​

Audit trail: query, evidence verification and application events.

Audit.query​

JsonNode query(Map<String, ?> filters)

Search the audit events. Searches the audit events of the tenant, newest first (highest sequence first), paginated. All filters combine. Needs auditor, security_officer or tenant_admin. The search itself is recorded in the evidence access log (who, which query, how many results).

Route: /v1/audit/events (GET).

NameTypeDefaultRequiredDescription
filtersMap<String, ?>yesQuery filters of GET /v1/audit/events, may be null.

Returns: JsonNode. Decoded JSON answer of the operation "Search the audit events".

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

Audit.record​

JsonNode record(Object event)

Record an application audit event. Appends an application event to the tenant hash chain. The actor comes from the authentication; the sequence, the hashes and occurred_at from the server; the client details are kept under evidence.details.attributes, next to stream: sdk. The event is sealed and exported to the outbox and the SIEM like the platform events.

Route: /v1/audit/events (POST).

NameTypeDefaultRequiredDescription
eventObjectyesApplication event (app. action) to seal in the tenant chain.

Returns: JsonNode. Decoded JSON answer of the operation "Record an application audit event".

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

Audit.verifyEvidence​

JsonNode verifyEvidence()

Verify the chain and every seal. Verifies the whole tenant chain and every seal and returns tenant_id, valid, chain (hash chain result), seals (count and failures), clock (timestamp failures) and events (number checked). Needs auditor, security_officer or tenant_admin. The verification is recorded in the access log.

Route: /v1/evidence/verify (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Verify the chain and every seal".

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

Class SdkInterfaces.Authz​

Relation checks with a confirmed decision, never a default allow.

Authz.check​

Decision check(Check c)

Check a relation. Tells whether subject holds relation on object, following inheritance. Up to 20 contextual_tuples are taken as true for this check only and never stored (an invalid one answers 422 validation_error). Open to any member of the tenant. The answer gives allowed, engine, subject, relation and object. Writes the audit event authz.check with the decision. When the engine cannot answer, the decision is a refusal, it is audited and the API answers 502 authz_backend_error.

Route: /v1/authz/check (POST).

NameTypeDefaultRequiredDescription
cCheckyesSubject, relation, object check to send.

Returns: Decision. Decoded JSON answer of the operation "Check a relation".

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

Authz.checkBatch​

List<Decision> checkBatch(List<Check> checks)

Check a relation. Tells whether subject holds relation on object, following inheritance. Up to 20 contextual_tuples are taken as true for this check only and never stored (an invalid one answers 422 validation_error). Open to any member of the tenant. The answer gives allowed, engine, subject, relation and object. Writes the audit event authz.check with the decision. When the engine cannot answer, the decision is a refusal, it is audited and the API answers 502 authz_backend_error.

Route: /v1/authz/check (POST).

NameTypeDefaultRequiredDescription
checksList<Check>yesChecks sent one by one; the first error stops the batch.

Returns: List<Decision>. Decoded JSON answer of the operation "Check a relation".

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

Authz.explain​

JsonNode explain(Object body)

Authorize an action under a delegation. Computes the effective permission of an action: user AND agent AND delegation AND resource restriction AND relationship (OpenFGA or the builtin tuples) AND policy (OPA or builtin). Give delegation_id, or run_id to use the delegation of a run (400 invalid_request without either; 403 delegation_required for a run without delegation).

Route: /v1/delegations/authorize (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAction, delegation or run, and the scope, resource, relation, audience and classification to check.

Returns: JsonNode. Decoded JSON answer of the operation "Authorize an action under a delegation".

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

Model SdkInterfaces.Check​

One relation check and its confirmed answer.

Fields:

NameTypeRequiredDescription
subjectStringyesSubject of the check, for example user:alice.
relationStringyesRelation checked between the subject and the object.
objectStringyesObject checked, <type>:<id>, for example project:42.

Model SdkInterfaces.Decision​

Confirmed decision of a check: the check, allowed and the engine that answered.

Fields:

NameTypeRequiredDescription
checkCheckyesOne relation check and its confirmed answer.
allowedbooleanyesExplicit allowed boolean returned by the server.
engineStringyesAuto (default), HPA or KEDA.

Class SdkInterfaces.Delegation​

Delegation chains: create, verify, restrict and revoke.

Delegation.create​

JsonNode create(Object body)

Create a delegation. Creates a root delegation from the caller to a delegate. Open to members of the tenant; an agent cannot create a root delegation by itself (403 delegation_root_forbidden).

Route: /v1/delegations (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesDelegate, rights, limits and expiry of the delegation.

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

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

Delegation.restrict​

JsonNode restrict(String id, Object body)

Restrict a delegation for a sub-delegate. Creates a child delegation, always covered by its parent: a sub-agent never gets wider rights. Allowed to the root or creator of the parent, an agent, a tenant_admin or a security_officer (403 forbidden).

Route: /v1/delegations/{delegation_id}/restrict (POST).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the parent delegation.
bodyObjectyesSub-delegate and narrower rights.

Returns: JsonNode. Decoded JSON answer of the operation "Restrict a delegation for a sub-delegate".

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

Delegation.revoke​

JsonNode revoke(String id, Object body)

Revoke a delegation. Revokes the delegation and every descendant; their execution contexts are revoked with them, effective at the next action. Allowed to its root, creator or the person acted for, and to tenant_admin and security_officer (403 forbidden). Writes the audit event delegation.revoke.

Route: /v1/delegations/{delegation_id}/revoke (POST).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the delegation.
bodyObjectyesOptional reason.

Returns: JsonNode. Decoded JSON answer of the operation "Revoke a delegation".

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

Delegation.verify​

JsonNode verify(String token, String audience)

Verify a signed execution context. Checks a token and returns valid, context_id, kid, alg, the claims and the context document. Checks, in order: structure and canonical form (context_malformed), algorithm and signature (context_invalid_signature), known non revoked key (context_unknown_key), issuer (context_wrong_issuer), audience (context_wrong_audience), lifetime (context_expired), tenant of the caller (403 context_tenant_mismatch), issuance record (context_revoked), digest of the document and delegation chain (a revoked delegation gives context_revoked). Refusals answer 401 unless stated and are audited; a success binds the verified identity to the audit events of the request.

Route: /v1/context/verify (POST).

NameTypeDefaultRequiredDescription
tokenStringyesThe JWS compact token (10 to 65536 characters).
audienceStringyesAudience the verifier expects (up to 200 characters). Default: the first platform audience.

Returns: JsonNode. Decoded JSON answer of the operation "Verify a signed execution context".

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

Class SdkInterfaces.Finops​

FinOps. Cost management of AI usage: price cards, usage events, estimates, quotas and reservations, GPU cost allocation, billing reconciliation and alerts.

Finops.checkBudget​

JsonNode checkBudget()

Read the quota consumption. Each quota of the tenant with its current window and the cost and tokens used and reserved in it. Run quotas need run to find their window. Requires a reader role and a tenant principal.

Route: /v1/quotas/usage (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Read the quota consumption".

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

Finops.recordUsage​

JsonNode recordUsage(Object event)

Ingest a usage event. Validates a Usage Event v1, prices it (measured cost in the tenant currency) and stores it; answers 201, or 200 with duplicate: true when the same event_id was already stored. An invalid event answers 422 usage_event_invalid with the errors; an event of another tenant 403 usage_tenant_mismatch. One audit event per call, never the payload. Requires finops, tenant_admin, agent or developer, and a tenant principal.

Route: /v1/finops/usage (POST).

NameTypeDefaultRequiredDescription
eventObjectyesUsage event sent to POST /v1/finops/usage, such as a UsageEvent.

Returns: JsonNode. Decoded JSON answer of the operation "Ingest a usage event".

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

Finops.reserve​

JsonNode reserve(Object body)

Reserve cost and tokens. Reserves an amount on every enabled quota matching the scope (tenant quotas always match; a user principal adds its own user scope) and answers 201 with the reservation, its items per quota and window, the soft quotas exceeded and its expiry. A hard quota that would be exceeded answers 429 quota_exceeded with Retry-After: 60, and nothing is reserved. Expired reservations are released first. Audited. Requires finops, tenant_admin, agent or developer, and a tenant principal.

Route: /v1/quotas/reserve (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAmount, scope and lifetime of the reservation.

Returns: JsonNode. Decoded JSON answer of the operation "Reserve cost and tokens".

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

Class SdkInterfaces.Identity​

Identity of the caller, verification of execution contexts and service identity assumption.

Identity.assumeService​

JsonNode assumeService(String identityId, String purpose, List<String> audience, Integer ttlSeconds, List<String> scopes)

Assume a service identity. Returns a signed, short lived ExecutionContext whose subject is the service identity, for the caller. It is not an API credential: downstream services verify it (POST /v1/context/verify or the JWKS) and the caller revokes it with POST /v1/context/{context_id}/revoke.

Route: /v1/service-identities/{identity_id}/assume (POST).

NameTypeDefaultRequiredDescription
identityIdStringyesId of the service identity to assume.
purposeStringyesDeclared purpose of the assumption, sent as purpose.
audienceList<String>yesServices allowed to accept the context, 1 to 10 known audiences. Null: the default audience of the Context Authority.
ttlSecondsIntegeryesLifetime of the context in seconds, 30 to 3600 (default 900).
scopesList<String>yesScopes requested, at most 50. Default: the scopes of the identity. Each must be granted by the identity and held by the caller.

Returns: JsonNode. The server answer, which always holds a non empty token.

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

Identity.assumeService​

JsonNode assumeService(String identityId, String purpose)

#assumeService(String, String, List, Integer, List) with the server defaults.

NameTypeDefaultRequiredDescription
identityIdStringyesId of the service identity to assume.
purposeStringyesDeclared purpose of the assumption, sent as purpose.

Returns: JsonNode. The server answer, which always holds a non empty token.

Identity.current​

JsonNode current()

Show the calling identity. Returns the identity the platform resolved for this request, whatever the credential (OIDC token, portal session, API key, SPIFFE): id, kind (user, service, agent, system), tenant_id, tenant_slug, roles, scopes, clearance, auth_method and display. Read only, open to any authenticated caller, also while a local account must still change its password. Use it to check a new token or key.

Route: /v1/identity/whoami (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Show the calling identity".

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

Identity.verify​

JsonNode verify(String token, String audience)

Verify a signed execution context. Checks a token and returns valid, context_id, kid, alg, the claims and the context document. Checks, in order: structure and canonical form (context_malformed), algorithm and signature (context_invalid_signature), known non revoked key (context_unknown_key), issuer (context_wrong_issuer), audience (context_wrong_audience), lifetime (context_expired), tenant of the caller (403 context_tenant_mismatch), issuance record (context_revoked), digest of the document and delegation chain (a revoked delegation gives context_revoked). Refusals answer 401 unless stated and are audited; a success binds the verified identity to the audit events of the request.

Route: /v1/context/verify (POST).

NameTypeDefaultRequiredDescription
tokenStringyesThe JWS compact token (10 to 65536 characters).
audienceStringyesAudience the verifier expects (up to 200 characters). Default: the first platform audience.

Returns: JsonNode. Decoded JSON answer of the operation "Verify a signed execution context".

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

Class SdkInterfaces.IncompleteResponseException​

Raised when a documented field is absent from the answer.

EaiException

Constructor IncompleteResponseException​

IncompleteResponseException(String field)

Creates the 502 incomplete_response error for the missing field.

NameTypeDefaultRequiredDescription
fieldStringyesName of the missing field, put in the message.

Class SdkInterfaces.Llm​

Model calls through the AI Gateway: chat, SSE stream, embeddings and vision.

Llm.embed​

JsonNode embed(Object body)

Compute embeddings. OpenAI compatible embeddings through the same controls as chat (kill switches, allow lists, classification, DLP on each input, cost guardrails, policy decision, audit). The model must declare the embeddings capability and, when dimensions is given, support it (422 capability_not_supported, 422 embedding_dimensions_invalid). Requires a tenant principal with the scope models:invoke.

Route: /v1/gateway/embeddings (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesOpenAI embeddings request (model, input as a text or a list, optional dimensions) plus the optional eai object.

Returns: JsonNode. Decoded JSON answer of the operation "Compute embeddings".

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

Llm.generate​

JsonNode generate(Object body)

Call a chat model. OpenAI compatible chat completion through every control of the gateway; with stream: true the answer is Server-Sent Events, with the cost guardrails checked during the stream. Requires a tenant principal (403 platform_only) whose credential carries the scope models:invoke.

Route: /v1/gateway/chat/completions (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesOpenAI chat request (model is the registry id, messages, stream, max_tokens, tools...) plus the optional eai object: data_classification (public, internal by default, confidential, restricted, secret), agent_id, session_id, run_id, purpose, project_id, effort, max_cost, fallback_policy and allow lists that can only narrow the tenant ones (provider_allow, model_allow, region_allow).

Returns: JsonNode. Decoded JSON answer of the operation "Call a chat model".

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

Llm.stream​

io.enterpriseai.SseStream stream(Map<String, ?> body)

Call a chat model. OpenAI compatible chat completion through every control of the gateway; with stream: true the answer is Server-Sent Events, with the cost guardrails checked during the stream. Requires a tenant principal (403 platform_only) whose credential carries the scope models:invoke.

Route: /v1/gateway/chat/completions (POST).

NameTypeDefaultRequiredDescription
bodyMap<String, ?>yesOpenAI chat request (model is the registry id, messages, stream, max_tokens, tools...) plus the optional eai object: data_classification (public, internal by default, confidential, restricted, secret), agent_id, session_id, run_id, purpose, project_id, effort, max_cost, fallback_policy and allow lists that can only narrow the tenant ones (provider_allow, model_allow, region_allow).

Returns: io.enterpriseai.SseStream. A SseStream: Blocking Server-Sent Events reader. Use it with try-with-resources, as an Iterator, a Stream or a reactive Flow.Publisher. A data: [DONE] event ends the stream.

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

Llm.vision​

JsonNode vision(Object body)

Understand an image. Starts a vision understanding job on an image media or inline image with a prompt (201, the job). The answer goes through the DLP with dlp_mode. detail answers 422 parameter_unsupported when the configured provider cannot honour it; a non image input answers 422 unsupported_media. Needs tenant_admin, developer or agent.

Route: /v1/multimodal/vision (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesInput image, prompt, model, DLP mode and detail level.

Returns: JsonNode. Decoded JSON answer of the operation "Understand an image".

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

Class SdkInterfaces.Mcp​

MCP gateway. Registry of the upstream MCP servers (Model Context Protocol) and the MCP Gateway, a JSON-RPC 2.0 proxy that applies the platform controls to every call: project isolation, allowed callers, allow lists of tools and resources, scopes, DLP, policy, quota, prompt injection screening, metering and audit.

Mcp.connect​

JsonNode connect(String serverId)

Call an MCP server through the gateway. JSON-RPC 2.0 proxy. The body is one request or a batch (at most 50 are handled). Needs tenant_admin, developer or agent and the ReBAC relation can_invoke. Refusals are answered as JSON-RPC errors with HTTP 200, and audited. Checks, in order: valid JSON-RPC 2.0; server active; project isolation (mcp_server_project_mismatch); allowed callers (mcp_principal_not_allowed); a sleeping hosted instance is woken up; a third party application must be active and granted the server; method allowed; for tools/call: tool in allowed_tools, scope tools:invoke, DLP on the arguments; policy mcp.call; quota reservation; for resources/read: URI in allowed_resources. Then the call is forwarded with the upstream credentials; tools/list and resources/list are filtered by the allow lists, tools/call results are masked by DLP and screened for prompt injection, and the call is metered as a tool usage.

Route: /v1/mcp/gateway/{server_id} (POST).

NameTypeDefaultRequiredDescription
serverIdStringyesIdentifier (UUID) or name of the MCP server.

Returns: JsonNode. Decoded JSON answer of the operation "Call an MCP server through the gateway".

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

Mcp.invoke​

JsonNode invoke(String serverId, String tool, Map<String, ?> arguments)

Call an MCP server through the gateway. JSON-RPC 2.0 proxy. The body is one request or a batch (at most 50 are handled). Needs tenant_admin, developer or agent and the ReBAC relation can_invoke. Refusals are answered as JSON-RPC errors with HTTP 200, and audited. Checks, in order: valid JSON-RPC 2.0; server active; project isolation (mcp_server_project_mismatch); allowed callers (mcp_principal_not_allowed); a sleeping hosted instance is woken up; a third party application must be active and granted the server; method allowed; for tools/call: tool in allowed_tools, scope tools:invoke, DLP on the arguments; policy mcp.call; quota reservation; for resources/read: URI in allowed_resources. Then the call is forwarded with the upstream credentials; tools/list and resources/list are filtered by the allow lists, tools/call results are masked by DLP and screened for prompt injection, and the call is metered as a tool usage.

Route: /v1/mcp/gateway/{server_id} (POST).

NameTypeDefaultRequiredDescription
serverIdStringyesIdentifier (UUID) or name of the MCP server.
toolStringyesOnly the invocations of this tool name.
argumentsMap<String, ?>yesArguments of the MCP tool, sent as the JSON body.

Returns: JsonNode. Decoded JSON answer of the operation "Call an MCP server through the gateway".

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

Mcp.listTools​

JsonNode listTools(String serverId)

List the tools of an MCP server. Calls tools/list on the server through the gateway and returns the tools allowed by allowed_tools. Needs the ReBAC relation can_invoke and access to the project of the server. An upstream error answers 502 upstream_error.

Route: /v1/mcp/servers/{server_id}/tools (GET).

NameTypeDefaultRequiredDescription
serverIdStringyesIdentifier (UUID) or name of the MCP server.

Returns: JsonNode. Decoded JSON answer of the operation "List the tools of an MCP server".

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

Class SdkInterfaces.Privacy​

Privacy and data protection. Data protection services of the tenant: classification, DLP (data loss prevention), tokenization and envelope encryption.

Privacy.detect​

JsonNode detect(Object body)

Inspect a text for sensitive data. Runs DLP on the text with the tenant rules, in mode detect unless mode says otherwise. The answer gives text, findings (type, position, score, classification, short preview, action, rule), action (strongest action applied), classification, mode, engine (builtin or presidio), blocked and count. An unknown mode answers 400. Open to any member of the tenant. Writes the audit event dlp.inspect (counts and types only).

Route: /v1/dlp/inspect (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesText, optional mode and language.

Returns: JsonNode. Decoded JSON answer of the operation "Inspect a text for sensitive data".

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

Privacy.detokenize​

JsonNode detokenize(Object body)

Detokenize values. Returns the original values of tokens given in tokens or found in text.

Route: /v1/tokenization/detokenize (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTokens or text holding tokens, and purpose.

Returns: JsonNode. Decoded JSON answer of the operation "Detokenize values".

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

Privacy.encrypt​

JsonNode encrypt(Object body)

Encrypt data with a tenant key. Encrypts plaintext (UTF-8 text) or plaintext_base64 (bytes) with the current version of the key, bound to aad. Returns ciphertext (eaienc1:...), key_id and key_version. One of the two inputs is required, and base64 must be valid (400 invalid_request); an unknown key answers 404 key_not_found. Open to any member of the tenant. Writes the audit event encryption.encrypt (size only).

Route: /v1/encryption/encrypt (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesKey, data to encrypt and associated data.

Returns: JsonNode. Decoded JSON answer of the operation "Encrypt data with a tenant key".

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

Privacy.mask​

JsonNode mask(String text)

Redact sensitive data from a text. Same as inspect, in mode mask by default: each finding is replaced by [TYPE] (for example [EMAIL]), or tokenized or blocked when a tenant rule or mode says so; a blocked text comes back empty with blocked: true. Open to any member of the tenant. Writes the audit event dlp.redact.

Route: /v1/dlp/redact (POST).

NameTypeDefaultRequiredDescription
textStringyesText to inspect or redact.

Returns: JsonNode. Decoded JSON answer of the operation "Redact sensitive data from a text".

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

Privacy.tokenize​

JsonNode tokenize(Object body)

Tokenize values. Replaces sensitive values by deterministic tokens tok_<type>_<hex> of the tenant (the same value always gives the same token), the values being stored encrypted in the vault. With values, returns tokens; with text, detects the entities and returns the tokenized text, findings and classification. One of the two is required (400 invalid_request). Open to any member of the tenant. Writes the audit event tokenization.tokenize (count only).

Route: /v1/tokenization/tokenize (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesValues or text to tokenize.

Returns: JsonNode. Decoded JSON answer of the operation "Tokenize values".

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

Class SdkInterfaces.Rag​

Knowledge bases. Knowledge bases for retrieval augmented generation (RAG): documents are scanned, extracted, screened for personal data and poisoning, chunked, embedded through the Model Gateway and searched with ACL and clearance filters.

Rag.cite​

JsonNode cite(String kbId, Object body)

Citations of the query results.

NameTypeDefaultRequiredDescription
kbIdStringyesId of the knowledge base.
bodyObjectyesRequest body, serialized as JSON.

Returns: JsonNode. The citations field of the answer; IncompleteResponseException when absent.

Rag.ingest​

JsonNode ingest(String kbId, Object body)

Add a document. Ingests a document (201). Needs the ReBAC relation editor and write access by the ACL (403 not_permitted_acl). Steps: 1. The content (content or content_base64, one is required, else 400) is scanned by ClamAV and YARA-X (422 file_blocked, 503 file_scan_unavailable), then the text is extracted by Docling (422 unsupported_media). 2. Personal data detection may raise the classification; a source_connector must be active. 3. A document with the same uri replaces the previous version (version + 1). 4. The text is chunked, embedded and stored; the poisoning screening may put the document in quarantine (status: quarantined). 409 knowledge_base_reindexing while a reindex runs; 409 embedding_dimension_mismatch; 503 vector_store_unavailable. Audited as knowledge.document.ingest.

Route: /v1/knowledge-bases/{kb_id}/documents (POST).

NameTypeDefaultRequiredDescription
kbIdStringyesIdentifier (UUID) of the knowledge base.
bodyObjectyesContent, title, URI, classification, readers and metadata of the document.

Returns: JsonNode. Decoded JSON answer of the operation "Add a document".

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

Rag.retrieve​

JsonNode retrieve(String kbId, Object body)

ACL filtered results of the query.

NameTypeDefaultRequiredDescription
kbIdStringyesId of the knowledge base.
bodyObjectyesRequest body, serialized as JSON.

Returns: JsonNode. The results field of the answer; IncompleteResponseException when absent.

Rag.search​

JsonNode search(String kbId, Object body)

Query a knowledge base. Searches the knowledge base and returns results (chunk, score, injection risk, classification, provenance), citations and a lineage_run_id. Needs the ReBAC relation can_invoke. Steps: 1. The policy knowledge.query is evaluated and a quota reservation is taken. 2. The query is embedded with the model of the knowledge base; only chunks whose readers match the caller identities and whose classification fits its clearance are searched. 3. Retrieved chunks are screened for prompt injection (dropped in block mode) and checked against active sources. 4. hybrid re-scores the candidates with keyword overlap; rerank orders them with a rerank model (a refusal is reported in warnings, never hidden). A caller outside the ACL gets an empty result, audited as a denial. Audited as knowledge.query; usage is metered.

Route: /v1/knowledge-bases/{kb_id}/query (POST).

NameTypeDefaultRequiredDescription
kbIdStringyesIdentifier (UUID) of the knowledge base.
bodyObjectyesQuery text and search options.

Returns: JsonNode. Decoded JSON answer of the operation "Query a knowledge base".

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

Class SdkInterfaces.Security​

Security posture, incident report and run cancellation.

Security.cancelRun​

JsonNode cancelRun(String runId)

Cancel a run. Moves the run to cancelled with the error cancelled; its active sub-agent runs are cancelled too. Needs tenant_admin, developer, agent or security_officer. A run already terminal answers 409 invalid_transition. Audited as run.transition.

Route: /v1/runs/{run_id}/cancel (POST).

NameTypeDefaultRequiredDescription
runIdStringyesIdentifier (UUID) of the run.

Returns: JsonNode. Decoded JSON answer of the operation "Cancel a run".

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

Security.checkState​

JsonNode checkState()

Get the security posture. Returns environment, generated_at, protections (authentication methods and other protections in force), checks (each with its status pass, warn or fail, severity and message) and summary (number of checks per status). For a caller with a tenant, also tenant with the security settings of the tenant, which some checks take into account. Needs security_officer or tenant_admin. Read only.

Route: /v1/security/posture (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Get the security posture".

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

Security.reportIncident​

JsonNode reportIncident(Object body)

Open an incident. Opens an incident in status open, adds the created entry to the timeline and forwards it to the SIEM. Needs tenant_admin, security_officer, developer or agent. An unknown severity answers 400 invalid_request. Writes the audit event incident.create. The answer (201) carries the incident with its timeline.

Route: /v1/incidents (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTitle, severity, description, category, resources and assignee.

Returns: JsonNode. Decoded JSON answer of the operation "Open an incident".

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

Class SdkInterfaces.Span​

Client side span sent by Trace#endSpan.

Fields:

NameTypeRequiredDescription
traceIdStringyesTrace id (32 hex characters), generated when not given.
spanIdStringyesRandom id of the span (16 hex characters).
parentSpanIdStringyesId of the parent span, or null.
nameStringyesName of the span.

Class SdkInterfaces.Storage​

Storage. Storage profiles: the client buckets and containers the platform writes to (audit exports, evidence, documents, media, exports, backups), with their credential reference and their capabilities discovered by real calls.

Storage.delete​

JsonNode delete(String profileId, String key, String versionId)

Delete an object of a profile. Deletes one object (or one version of it) inside the presign prefixes of the profile. A profile serving audit_worm or evidence never deletes through the API (409 storage_object_protected); a retention refusal of the backend is returned as is. Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.object.delete; audited with the full key and version. Other errors: 403 storage_key_out_of_scope, 422 storage_key_invalid, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects/delete (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
keyStringyesKey of the object relative to the profile key prefix, 1 to 1024 characters, inside a presign prefix; no control character, no leading /, no . or .. segment.
versionIdStringyesVersion of the object to delete on a versioned bucket, 1 to 1024 characters. Omit it to delete the current version.

Returns: JsonNode. Decoded JSON answer of the operation "Delete an object of a profile".

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

Storage.get​

JsonNode get(String profileId, String key)

Issue a presigned URL. Issues a presigned URL to read (GET) or write (PUT) one object directly in the bucket, and answers 201 with the grant id, URL, method, full key, lifetime and expiry. The key must be inside the presign prefixes (403 storage_key_out_of_scope) and the profile must have a verified, recent presign capability (409 storage_capability_missing). The lifetime may not exceed EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default, never more than 604800; 422 storage_presign_expiry_invalid). Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.presign.read or storage.presign.write. The grant is recorded with a SHA-256 of the URL (never the URL itself) and audited.

Route: /v1/storage/profiles/{profile_id}/presign (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
keyStringyesKey of the object relative to the profile key prefix, 1 to 1024 characters, inside a presign prefix of the profile.

Returns: JsonNode. Decoded JSON answer of the operation "Issue a presigned URL".

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

Storage.list​

JsonNode list(String profileId, Map<String, ?> query)

List the objects of a profile. Objects stored under a prefix inside the presign prefixes of the profile: key relative to the profile key prefix (usable with presign and delete), stored key, size, ETag, content type, SHA-256, version, last modification and storage class. Requires tenant_admin, developer, agent or auditor (platform profile: platform_admin) and the policy decision storage.object.list; the listing is audited. Errors: 422 storage_prefix_required when prefix is omitted and the profile has not exactly one presign prefix, 403 storage_key_out_of_scope outside the presign prefixes, 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/objects (GET).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
queryMap<String, ?>yesQuery string parameters of the route.

Returns: JsonNode. Decoded JSON answer of the operation "List the objects of a profile".

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

Storage.put​

JsonNode put(String profileId, String key)

Issue a presigned URL. Issues a presigned URL to read (GET) or write (PUT) one object directly in the bucket, and answers 201 with the grant id, URL, method, full key, lifetime and expiry. The key must be inside the presign prefixes (403 storage_key_out_of_scope) and the profile must have a verified, recent presign capability (409 storage_capability_missing). The lifetime may not exceed EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default, never more than 604800; 422 storage_presign_expiry_invalid). Requires tenant_admin, developer or agent (platform profile: platform_admin) and the policy decision storage.presign.read or storage.presign.write. The grant is recorded with a SHA-256 of the URL (never the URL itself) and audited.

Route: /v1/storage/profiles/{profile_id}/presign (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.
keyStringyesKey of the object relative to the profile key prefix, 1 to 1024 characters, inside a presign prefix of the profile.

Returns: JsonNode. Decoded JSON answer of the operation "Issue a presigned URL".

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

Storage.verify​

JsonNode verify(String profileId)

Verify the capabilities of a profile. Discovers the capabilities of the bucket by real calls and stores them. Requires tenant_admin or security_officer (platform profile: platform_admin) and the policy decision storage.profile.verify. A disabled profile answers 409 storage_profile_disabled.

Route: /v1/storage/profiles/{profile_id}/verify (POST).

NameTypeDefaultRequiredDescription
profileIdStringyesIdentifier (UUID) of the storage profile.

Returns: JsonNode. Decoded JSON answer of the operation "Verify the capabilities of a profile".

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

Class SdkInterfaces.Subagent​

Agents. Registry of the tenant's agents and the server side execution of their runs: steps, budgets, checkpoints, heartbeats, sub-agents, agent to agent (A2A) messages, conversation sessions, cron schedules, event triggers and sandbox executions.

Subagent.cancel​

JsonNode cancel(String childRunId)

Cancel a run. Moves the run to cancelled with the error cancelled; its active sub-agent runs are cancelled too. Needs tenant_admin, developer, agent or security_officer. A run already terminal answers 409 invalid_transition. Audited as run.transition.

Route: /v1/runs/{run_id}/cancel (POST).

NameTypeDefaultRequiredDescription
childRunIdStringyesIdentifier (UUID) of the run.

Returns: JsonNode. Decoded JSON answer of the operation "Cancel a run".

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

Subagent.delegate​

JsonNode delegate(String parentRunId, String agent, Map<String, ?> task)

Spawn a sub-agent run. Starts a child run from a pending or running parent (else 409 run_not_running) and returns its Execution Contract. Needs tenant_admin, developer or agent and the scope agents:run. Checks, in order: the Kill Switch Registry; the depth against autonomy.max_depth (default 1, 409 subagent_depth_exceeded); the number of children against autonomy.max_subagents (default 3, 409 subagent_count_exceeded); the child agent against the subagents list of the parent manifest (403 subagent_not_allowed); the parent delegation. The child budget cannot exceed what the parent has left, the child joins the parent session, and a running parent records a subagent step.

Route: /v1/runs/{run_id}/subagents (POST).

NameTypeDefaultRequiredDescription
parentRunIdStringyesIdentifier (UUID) of the parent run.
agentStringyesChild agent, name or agent:<name>. Default: the agent of the parent run.
taskMap<String, ?>yesTask of the child run (task_id, objective, input).

Returns: JsonNode. Decoded JSON answer of the operation "Spawn a sub-agent run".

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

Subagent.spawn​

JsonNode spawn(String parentRunId, Object body)

Spawn a sub-agent run. Starts a child run from a pending or running parent (else 409 run_not_running) and returns its Execution Contract. Needs tenant_admin, developer or agent and the scope agents:run. Checks, in order: the Kill Switch Registry; the depth against autonomy.max_depth (default 1, 409 subagent_depth_exceeded); the number of children against autonomy.max_subagents (default 3, 409 subagent_count_exceeded); the child agent against the subagents list of the parent manifest (403 subagent_not_allowed); the parent delegation. The child budget cannot exceed what the parent has left, the child joins the parent session, and a running parent records a subagent step.

Route: /v1/runs/{run_id}/subagents (POST).

NameTypeDefaultRequiredDescription
parentRunIdStringyesIdentifier (UUID) of the parent run.
bodyObjectyesChild agent, task and budget.

Returns: JsonNode. Decoded JSON answer of the operation "Spawn a sub-agent run".

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

Class SdkInterfaces.Tools​

Tool discovery, invocation and validation of a tool invocation.

Tools.discover​

JsonNode discover()

List the tools. Tools of the tenant in name order, optionally with one status. One page only.

Route: /v1/tools (GET).

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "List the tools".

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

Tools.invoke​

JsonNode invoke(String name, Object body)

Invoke a tool through the gateway. Runs the gateway pipeline described in the tag introduction and returns the invocation: status, masked result, error, duration_ms, decision_id, DLP findings, usage event and cost. Needs tenant_admin, developer or agent and the ReBAC relation can_invoke. Answers: 200 when executed (also when the upstream failed, see status and error); 202 pending_approval with approval_id when a human approval is needed (call again with the approved approval_id and the same arguments); 202 for a sandbox tool, with the sandbox execution id. Errors: 403 tool_blocked, insufficient_scope, tool_not_granted, classification_exceeded, policy_denied, dlp_blocked; 422 invalid_arguments; 409 approval_consumed (an approval serves one successful call); 429 rate_limited with Retry-After: 60 or quota_exceeded.

Route: /v1/tools/{name}/invoke (POST).

NameTypeDefaultRequiredDescription
nameStringyesName of the tool.
bodyObjectyesArguments of the call and its context (run, agent, approval, purpose, classification).

Returns: JsonNode. Decoded JSON answer of the operation "Invoke a tool through the gateway".

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

Tools.validate​

JsonNode validate(Object invocation)

Validate a document against a contract. Validates the body against the contract, formats included, without storing anything. The answer gives contract, valid and errors, each with the JSON path of the faulty value and a message. Open to any authenticated caller. An unknown contract answers 404 unknown_contract.

Route: /v1/contracts/{name}/validate (POST).

NameTypeDefaultRequiredDescription
invocationObjectyesTool invocation validated against the tool-invocation contract.

Returns: JsonNode. Decoded JSON answer of the operation "Validate a document against a contract".

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

Class SdkInterfaces.Trace​

Telemetry. Traces, request journal, live stream and service level objectives (SLO) of the platform.

Trace.endSpan​

JsonNode endSpan(Span span, String status)

Ingest telemetry spans. Accepts up to 5000 spans and answers 202 with the number accepted, the number stored (a span already known for the same trace and span id is skipped) and the result of each exporter (ok or error). Requires a tenant principal with tenant_admin, developer or agent (403 forbidden).

Route: /v1/telemetry/spans (POST).

NameTypeDefaultRequiredDescription
spanSpanyesSpan to end; an already ended span raises IllegalStateException.
statusStringyesFinal status of the span, sent as status.

Returns: JsonNode. Decoded JSON answer of the operation "Ingest telemetry spans".

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

Trace.recordEvent​

void recordEvent(Span span, String name, Map<String, ?> attributes)

Adds a timestamped event to the span, sent with it by endSpan.

NameTypeDefaultRequiredDescription
spanSpanyesSpan that receives the event.
nameStringyesName of the event.
attributesMap<String, ?>yesAttributes of the event, may be null.

Returns: void.

Trace.startSpan​

Span startSpan(String name, String traceId, String parentSpanId, Map<String, ?> attributes)

Starts a local span, timestamped now; nothing is sent before endSpan.

NameTypeDefaultRequiredDescription
nameStringyesName of the span.
traceIdStringyesTrace id to reuse, or null to generate one.
parentSpanIdStringyesId of the parent span, or null.
attributesMap<String, ?>yesInitial attributes of the span, copied, may be null.

Returns: Span. A Span: Client side span sent by Trace#endSpan.

Class SdkInterfaces.UnconfirmedDecisionException​

Raised when an authorization answer carries no explicit decision.

EaiException

Constructor UnconfirmedDecisionException​

UnconfirmedDecisionException()

Creates the 502 unconfirmed_decision error.

This element takes no parameter.