Skip to main content

io.enterpriseai.resources.RiskClient

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

Risk assessments, controls, exceptions and evidence.

Constructor RiskClient​

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

RiskClient.createAssessment​

JsonNode createAssessment(Object body)

Assess the risk of an AI system. Classifies the target under the EU AI Act and records the assessment. Needs tenant_admin, security_officer, developer or ai_governance_officer; the status approved needs tenant_admin, security_officer or ai_governance_officer (403 forbidden).

Route: /v1/risk/assessments (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTarget, use cases, answers, owner, status and evidence of the assessment.

Returns: JsonNode. Decoded JSON answer of the operation "Assess the risk of an AI system".

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

RiskClient.createAssessment​

JsonNode createAssessment(Object body, RequestOptions options)

Assess the risk of an AI system. Classifies the target under the EU AI Act and records the assessment. Needs tenant_admin, security_officer, developer or ai_governance_officer; the status approved needs tenant_admin, security_officer or ai_governance_officer (403 forbidden).

Route: /v1/risk/assessments (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTarget, use cases, answers, owner, status and evidence of the assessment.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Assess the risk of an AI system".

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

RiskClient.createControl​

JsonNode createControl(Object body)

Adopt or update a control. Creates or updates the control of the given code. For a catalogue code, the title and frameworks default to the catalogue ones. Needs tenant_admin or security_officer. Errors 400 invalid_request: status other than planned, implemented, partially_implemented or not_applicable; no title for a custom code; a framework other than iso_42001, nist_ai_rmf, gdpr or eu_ai_act. Evidence given is added. Writes the audit event risk.control.upsert.

Route: /v1/risk/controls (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesCode, title, frameworks, status, owner and evidence of the control.

Returns: JsonNode. Decoded JSON answer of the operation "Adopt or update a control".

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

RiskClient.createControl​

JsonNode createControl(Object body, RequestOptions options)

Adopt or update a control. Creates or updates the control of the given code. For a catalogue code, the title and frameworks default to the catalogue ones. Needs tenant_admin or security_officer. Errors 400 invalid_request: status other than planned, implemented, partially_implemented or not_applicable; no title for a custom code; a framework other than iso_42001, nist_ai_rmf, gdpr or eu_ai_act. Evidence given is added. Writes the audit event risk.control.upsert.

Route: /v1/risk/controls (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesCode, title, frameworks, status, owner and evidence of the control.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Adopt or update a control".

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

RiskClient.createException​

JsonNode createException(Object body)

Request a control exception. Records a time limited exception on a control (control_id or control_code) or on a target (target_ref). Needs tenant_admin, security_officer or developer.

Route: /v1/risk/exceptions (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesControl or target, reason, compensating controls, approver and expiry.

Returns: JsonNode. Decoded JSON answer of the operation "Request a control exception".

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

RiskClient.createException​

JsonNode createException(Object body, RequestOptions options)

Request a control exception. Records a time limited exception on a control (control_id or control_code) or on a target (target_ref). Needs tenant_admin, security_officer or developer.

Route: /v1/risk/exceptions (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesControl or target, reason, compensating controls, approver and expiry.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Request a control exception".

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

RiskClient.evidence​

JsonNode evidence()

Get the compliance evidence. Returns the evidence recorded on controls and assessments, newest first, plus evidence collected automatically from the platform and mapped to the catalogue controls: counts of agents, tools, models, assessments, enabled DLP rules and retention policies, keys, audit events and exports with the state of the audit chain, evaluations, red team runs, incidents and approvals. Open to any member of the tenant.

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

This element takes no parameter.

Returns: JsonNode. Decoded JSON answer of the operation "Get the compliance evidence".

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

RiskClient.listAssessments​

Page<JsonNode> listAssessments()

List the risk assessments. Lists the assessments of the tenant, newest first, at most 500, optionally for one target. Each item gives the target, eu_ai_act_category (also as risk_level), use cases, answers, rationale, obligations, status and owner. Open to any member of the tenant. next_cursor is always null.

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

RiskClient.listAssessments​

Page<JsonNode> listAssessments(Map<String, ?> query)

List the risk assessments. Lists the assessments of the tenant, newest first, at most 500, optionally for one target. Each item gives the target, eu_ai_act_category (also as risk_level), use cases, answers, rationale, obligations, status and owner. Open to any member of the tenant. next_cursor is always null.

Route: /v1/risk/assessments (GET).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery string parameters of the route.

Returns: Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

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

RiskClient.listControls​

Page<JsonNode> listControls()

List the controls. Lists the controls adopted by the tenant, ordered by code, each with evidence_count, its exceptions and active_exceptions, and the builtin catalog with adopted telling which ones the tenant uses. Open to any member of the tenant.

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

RiskClient.listExceptions​

io.enterpriseai.Page<JsonNode> listExceptions(Map<String, ?> query)

List the exceptions. Lists the exceptions of the tenant ordered by expiry, each with its computed status: active, expired or revoked. Open to any member of the tenant. next_cursor is always null.

Route: /v1/risk/exceptions (GET).

NameTypeDefaultRequiredDescription
queryMap<String, ?>yesQuery string parameters of the route.

Returns: io.enterpriseai.Page<JsonNode>. A Page: One page of a cursor paginated collection ({"items": [...], "next_cursor": "..."|null}).

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