Skip to main content

io.enterpriseai.resources.MandatesClient

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

Agent mandates.

Constructor MandatesClient​

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

MandatesClient.create​

JsonNode create(Object body)

Request a mandate for an agent. Requests a mandate so that an agent (optionally one of its schedules) runs autonomously under a service identity. Needs tenant_admin, developer or security_officer.

Route: /v1/mandates (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAgent, service identity, schedule, rights, purpose and lifetime of the mandate.

Returns: JsonNode. Decoded JSON answer of the operation "Request a mandate for an agent".

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

MandatesClient.create​

JsonNode create(Object body, RequestOptions options)

Request a mandate for an agent. Requests a mandate so that an agent (optionally one of its schedules) runs autonomously under a service identity. Needs tenant_admin, developer or security_officer.

Route: /v1/mandates (POST).

NameTypeDefaultRequiredDescription
bodyObjectyesAgent, service identity, schedule, rights, purpose and lifetime of the mandate.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

Returns: JsonNode. Decoded JSON answer of the operation "Request a mandate for an agent".

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

MandatesClient.get​

JsonNode get(String mandateId)

Get a mandate. Returns one mandate: agent, schedule, service identity, scopes, audience, resources, classification ceiling, depth, purpose, status, approval and expiry. Open to any member of the tenant. Answers 404 mandate_not_found.

Route: /v1/mandates/{mandate_id} (GET).

NameTypeDefaultRequiredDescription
mandateIdStringyesIdentifier (UUID) of the mandate.

Returns: JsonNode. Decoded JSON answer of the operation "Get a mandate".

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

MandatesClient.list​

JsonNode list()

List the mandates. Lists the mandates of the tenant, newest first, optionally for one agent, with their effective status (pending, approved, rejected, revoked or expired). Open to any member of the tenant.

Route: /v1/mandates (GET).

This element takes no parameter.

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

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

MandatesClient.list​

JsonNode list(Map<String, ?> query)

List the mandates. Lists the mandates of the tenant, newest first, optionally for one agent, with their effective status (pending, approved, rejected, revoked or expired). Open to any member of the tenant.

Route: /v1/mandates (GET).

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

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

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

MandatesClient.revoke​

JsonNode revoke(String mandateId, Object body)

Revoke a mandate. Revokes the mandate and the delegations rooted at it: the next scheduled run of the agent is refused (mandate_required). Allowed to the requester, a tenant_admin or a security_officer (403 forbidden). A revoked or rejected mandate answers 409 mandate_closed. Writes the audit event mandate.revoke.

Route: /v1/mandates/{mandate_id}/revoke (POST).

NameTypeDefaultRequiredDescription
mandateIdStringyesIdentifier (UUID) of the mandate.
bodyObjectyesOptional reason.

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

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

MandatesClient.revoke​

JsonNode revoke(String mandateId, Object body, RequestOptions options)

Revoke a mandate. Revokes the mandate and the delegations rooted at it: the next scheduled run of the agent is refused (mandate_required). Allowed to the requester, a tenant_admin or a security_officer (403 forbidden). A revoked or rejected mandate answers 409 mandate_closed. Writes the audit event mandate.revoke.

Route: /v1/mandates/{mandate_id}/revoke (POST).

NameTypeDefaultRequiredDescription
mandateIdStringyesIdentifier (UUID) of the mandate.
bodyObjectyesOptional reason.
optionsRequestOptionsyesPer call options (idempotency key, traceparent, headers, abort signal).

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

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