Skip to main content

io.enterpriseai.resources.RedteamClient

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

Red team runs.

Constructor RedteamClient​

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

RedteamClient.createRun​

JsonNode createRun(Object body)

Run a red team campaign. Sends adversarial probes to the target and stores the findings. Needs tenant_admin, developer, security_officer or ai_governance_officer.

Route: /v1/redteam/runs (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTarget, engine, probes and accepted attack success rate.

Returns: JsonNode. Decoded JSON answer of the operation "Run a red team campaign".

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

RedteamClient.createRun​

JsonNode createRun(Object body, RequestOptions options)

Run a red team campaign. Sends adversarial probes to the target and stores the findings. Needs tenant_admin, developer, security_officer or ai_governance_officer.

Route: /v1/redteam/runs (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesTarget, engine, probes and accepted attack success rate.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Run a red team campaign".

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

RedteamClient.getRun​

JsonNode getRun(String id)

Get a red team run. Returns one red team run: target, engine, probes, status, summary (total, vulnerable, attack success rate, threshold, per category) and findings. Open to any member of the tenant. Answers 404 not_found.

Route: /v1/redteam/runs/{run_id} (GET).

NameTypeDefaultRequiredDescription
idStringyesIdentifier (UUID) of the red team run.

Returns: JsonNode. Decoded JSON answer of the operation "Get a red team run".

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

RedteamClient.listRuns​

Page<JsonNode> listRuns()

List the red team runs. Lists the red team runs of the tenant, newest identifier first, paginated, and probes: the builtin probes (id and category), the garak probe families and whether garak is installed. Open to any member of the tenant.

Route: /v1/redteam/runs (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).

RedteamClient.listRuns​

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

List the red team runs. Lists the red team runs of the tenant, newest identifier first, paginated, and probes: the builtin probes (id and category), the garak probe families and whether garak is installed. Open to any member of the tenant.

Route: /v1/redteam/runs (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).