Skip to main content

io.enterpriseai.resources.OperationsClient

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

Long operations (architecture B6.3): every long creation answers with the Operation-Id and Operation-Location headers; an Idempotency-Key header makes a retry replay the first answer.

Constructor OperationsClient​

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

OperationsClient.get​

JsonNode get(String operationId)

Follow a long operation. The operation (kind, state pending or accepted, method, path, HTTP status, idempotency key, tracked resource, creator and dates), its accepted answer and the live state of the tracked resource. The resource is read with the caller's credentials through the resource route, so the resource authorization applies: when that read fails, result stays null and result_error.http_status gives the status. status is pending while the request runs, then the status or state of the resource. Requires a tenant principal (403 tenant_required); an operation created by someone else answers 404 not_found unless the caller holds tenant_admin, platform_admin, auditor or security_officer.

Route: /v1/operations/{operation_id} (GET).

NameTypeDefaultRequiredDescription
operationIdStringyesIdentifier of the operation, as returned in the Operation-Id header.

Returns: JsonNode. Decoded JSON answer of the operation "Follow a long operation".

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