Skip to main content

io.enterpriseai.resources.RetentionClient

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

Retention policies, erasure and legal hold.

Constructor RetentionClient​

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

RetentionClient.createPolicy​

JsonNode createPolicy(Object body)

Create or update a retention policy. Sets the retention policy of one resource type, replacing the existing one. Needs tenant_admin, security_officer or data_steward. An unknown resource type or an action other than erase or archive answers 400 invalid_request. The policy takes effect at the next retention run. Writes the audit event retention.policy.upsert. Answers 201 with the policy.

Route: /v1/retention/policies (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesResource type, lifetime and action of the policy.

Returns: JsonNode. Decoded JSON answer of the operation "Create or update a retention policy".

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

RetentionClient.createPolicy​

JsonNode createPolicy(Object body, RequestOptions options)

Create or update a retention policy. Sets the retention policy of one resource type, replacing the existing one. Needs tenant_admin, security_officer or data_steward. An unknown resource type or an action other than erase or archive answers 400 invalid_request. The policy takes effect at the next retention run. Writes the audit event retention.policy.upsert. Answers 201 with the policy.

Route: /v1/retention/policies (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesResource type, lifetime and action of the policy.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Create or update a retention policy".

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

RetentionClient.erase​

JsonNode erase(Object body)

Erase a data subject. Deletes the data held on one subject, in one transaction. Needs tenant_admin, security_officer or data_steward.

Route: /v1/retention/erase (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesSubject, scope and reason of the erasure.

Returns: JsonNode. Decoded JSON answer of the operation "Erase a data subject".

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

RetentionClient.erase​

JsonNode erase(Object body, RequestOptions options)

Erase a data subject. Deletes the data held on one subject, in one transaction. Needs tenant_admin, security_officer or data_steward.

Route: /v1/retention/erase (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesSubject, scope and reason of the erasure.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Erase a data subject".

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

RetentionClient.legalHold​

JsonNode legalHold(Object body)

Place or release a legal hold. Without hold_id, places a new hold on a subject (subject_id) or on one resource (resource_type and resource_id); reason is required (400 invalid_request otherwise). With hold_id, activates or releases that hold with active (404 not_found for an unknown hold).

Route: /v1/retention/legal-hold (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesNew hold, or the identifier of a hold to activate or release.

Returns: JsonNode. Decoded JSON answer of the operation "Place or release a legal hold".

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

RetentionClient.legalHold​

JsonNode legalHold(Object body, RequestOptions options)

Place or release a legal hold. Without hold_id, places a new hold on a subject (subject_id) or on one resource (resource_type and resource_id); reason is required (400 invalid_request otherwise). With hold_id, activates or releases that hold with active (404 not_found for an unknown hold).

Route: /v1/retention/legal-hold (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesNew hold, or the identifier of a hold to activate or release.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Place or release a legal hold".

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

RetentionClient.listPolicies​

Page<JsonNode> listPolicies()

List the retention policies. Returns the retention policies of the tenant ordered by resource type in items, and the active legal holds in legal_holds. Open to any member of the tenant. next_cursor is always null.

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

RetentionClient.run​

JsonNode run(Object body)

Run the retention policies. Applies the enabled policies now, to every resource type or to resource_types. Memory items and media past their own expiry are purged even without a policy; realtime transcripts and recordings follow the retention period of the participant consent. Items under legal hold are skipped.

Route: /v1/retention/run (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesOptional simulation flag and resource types. An empty body runs every policy for real.

Returns: JsonNode. Decoded JSON answer of the operation "Run the retention policies".

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

RetentionClient.run​

JsonNode run(Object body, RequestOptions options)

Run the retention policies. Applies the enabled policies now, to every resource type or to resource_types. Memory items and media past their own expiry are purged even without a policy; realtime transcripts and recordings follow the retention period of the participant consent. Items under legal hold are skipped.

Route: /v1/retention/run (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesOptional simulation flag and resource types. An empty body runs every policy for real.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Run the retention policies".

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