io.enterpriseai.resources.DelegationsClient
Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/resources/DelegationsClient.java. Back to the Java SDK reference index.
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 DelegationsClient
Delegation chains between principals.
Constructor DelegationsClient
DelegationsClient(Transport transport)
Creates the client on the shared transport; EnterpriseAIClient builds it and exposes it through the accessor of the same name.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
transport | Transport | yes | Transport shared by the sub-clients of one client. |
DelegationsClient.authorize
JsonNode authorize(Object body)
Authorize an action under a delegation. Computes the effective permission of an action: user AND agent AND delegation AND resource restriction AND relationship (OpenFGA or the builtin tuples) AND policy (OPA or builtin). Give delegation_id, or run_id to use the delegation of a run (400 invalid_request without either; 403 delegation_required for a run without delegation).
Route: /v1/delegations/authorize (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Action, delegation or run, and the scope, resource, relation, audience and classification to check. |
Returns: JsonNode. Decoded JSON answer of the operation "Authorize an action under a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.authorize
JsonNode authorize(Object body, RequestOptions options)
Authorize an action under a delegation. Computes the effective permission of an action: user AND agent AND delegation AND resource restriction AND relationship (OpenFGA or the builtin tuples) AND policy (OPA or builtin). Give delegation_id, or run_id to use the delegation of a run (400 invalid_request without either; 403 delegation_required for a run without delegation).
Route: /v1/delegations/authorize (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Action, delegation or run, and the scope, resource, relation, audience and classification to check. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Authorize an action under a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.create
JsonNode create(Object body)
Create a delegation. Creates a root delegation from the caller to a delegate. Open to members of the tenant; an agent cannot create a root delegation by itself (403 delegation_root_forbidden).
Route: /v1/delegations (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Delegate, rights, limits and expiry of the delegation. |
Returns: JsonNode. Decoded JSON answer of the operation "Create a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.create
JsonNode create(Object body, RequestOptions options)
Create a delegation. Creates a root delegation from the caller to a delegate. Open to members of the tenant; an agent cannot create a root delegation by itself (403 delegation_root_forbidden).
Route: /v1/delegations (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Delegate, rights, limits and expiry of the delegation. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Create a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.get
JsonNode get(String delegationId)
Get a delegation. Returns the delegation with the verification of its chain from the root (every link active, not expired, same tenant, covered by its parent). Visible to its root, creator and the person acted for, and to tenant_admin, security_officer, auditor and agent; otherwise 404 delegation_not_found.
Route: /v1/delegations/{delegation_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
delegationId | String | yes | Identifier (UUID) of the delegation. |
Returns: JsonNode. Decoded JSON answer of the operation "Get a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.list
JsonNode list()
List the delegations. Lists delegations, newest first, paginated: all of them for tenant_admin, security_officer and auditor, otherwise those the caller is the root, the creator or the person acted for. An unknown status answers 400.
Route: /v1/delegations (GET).
This element takes no parameter.
Returns: JsonNode. Decoded JSON answer of the operation "List the delegations".
Raises: the typed errors of the transport (Errors).
DelegationsClient.list
JsonNode list(Map<String, ?> query)
List the delegations. Lists delegations, newest first, paginated: all of them for tenant_admin, security_officer and auditor, otherwise those the caller is the root, the creator or the person acted for. An unknown status answers 400.
Route: /v1/delegations (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | Map<String, ?> | yes | Query string parameters of the route. |
Returns: JsonNode. Decoded JSON answer of the operation "List the delegations".
Raises: the typed errors of the transport (Errors).
DelegationsClient.restrict
JsonNode restrict(String delegationId, Object body)
Restrict a delegation for a sub-delegate. Creates a child delegation, always covered by its parent: a sub-agent never gets wider rights. Allowed to the root or creator of the parent, an agent, a tenant_admin or a security_officer (403 forbidden).
Route: /v1/delegations/{delegation_id}/restrict (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
delegationId | String | yes | Identifier (UUID) of the parent delegation. | |
body | Object | yes | Sub-delegate and narrower rights. |
Returns: JsonNode. Decoded JSON answer of the operation "Restrict a delegation for a sub-delegate".
Raises: the typed errors of the transport (Errors).
DelegationsClient.restrict
JsonNode restrict(String delegationId, Object body, RequestOptions options)
Restrict a delegation for a sub-delegate. Creates a child delegation, always covered by its parent: a sub-agent never gets wider rights. Allowed to the root or creator of the parent, an agent, a tenant_admin or a security_officer (403 forbidden).
Route: /v1/delegations/{delegation_id}/restrict (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
delegationId | String | yes | Identifier (UUID) of the parent delegation. | |
body | Object | yes | Sub-delegate and narrower rights. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Restrict a delegation for a sub-delegate".
Raises: the typed errors of the transport (Errors).
DelegationsClient.revoke
JsonNode revoke(String delegationId, Object body)
Revoke a delegation. Revokes the delegation and every descendant; their execution contexts are revoked with them, effective at the next action. Allowed to its root, creator or the person acted for, and to tenant_admin and security_officer (403 forbidden). Writes the audit event delegation.revoke.
Route: /v1/delegations/{delegation_id}/revoke (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
delegationId | String | yes | Identifier (UUID) of the delegation. | |
body | Object | yes | Optional reason. |
Returns: JsonNode. Decoded JSON answer of the operation "Revoke a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.revoke
JsonNode revoke(String delegationId, Object body, RequestOptions options)
Revoke a delegation. Revokes the delegation and every descendant; their execution contexts are revoked with them, effective at the next action. Allowed to its root, creator or the person acted for, and to tenant_admin and security_officer (403 forbidden). Writes the audit event delegation.revoke.
Route: /v1/delegations/{delegation_id}/revoke (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
delegationId | String | yes | Identifier (UUID) of the delegation. | |
body | Object | yes | Optional reason. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Revoke a delegation".
Raises: the typed errors of the transport (Errors).
DelegationsClient.revokePrincipal
JsonNode revokePrincipal(Object body)
Revoke every delegation of a principal. Revokes every active delegation rooted at a principal or acting for it, with their descendants and execution contexts, for example at user offboarding or after an account compromise. Needs tenant_admin or security_officer. Writes the audit event delegation.revoke_principal.
Route: /v1/delegations/revoke-principal (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Principal and reason. |
Returns: JsonNode. Decoded JSON answer of the operation "Revoke every delegation of a principal".
Raises: the typed errors of the transport (Errors).
DelegationsClient.revokePrincipal
JsonNode revokePrincipal(Object body, RequestOptions options)
Revoke every delegation of a principal. Revokes every active delegation rooted at a principal or acting for it, with their descendants and execution contexts, for example at user offboarding or after an account compromise. Needs tenant_admin or security_officer. Writes the audit event delegation.revoke_principal.
Route: /v1/delegations/revoke-principal (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | Object | yes | Principal and reason. | |
options | RequestOptions | yes | Per call options (idempotency key, traceparent, headers, abort signal). |
Returns: JsonNode. Decoded JSON answer of the operation "Revoke every delegation of a principal".
Raises: the typed errors of the transport (Errors).