Class CryptographicExchangesApi
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.CryptographicExchangesApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivateExchange(UUID id, ActivateRequest activateRequest) Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize Moves a READY Exchange to ACTIVE.okhttp3.CallactivateExchangeAsync(UUID id, ActivateRequest activateRequest, ApiCallback<ExchangeDetailResponse> _callback) Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize (asynchronously) Moves a READY Exchange to ACTIVE.okhttp3.CallactivateExchangeCall(UUID id, ActivateRequest activateRequest, ApiCallback _callback) Build call for activateExchangeactivateExchangeWithHttpInfo(UUID id, ActivateRequest activateRequest) Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize Moves a READY Exchange to ACTIVE.cloneExchange(UUID id, CloneRequest cloneRequest) Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance.okhttp3.CallcloneExchangeAsync(UUID id, CloneRequest cloneRequest, ApiCallback<ExchangeDetailResponse> _callback) Clone Exchange to DRAFT (asynchronously) Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance.okhttp3.CallcloneExchangeCall(UUID id, CloneRequest cloneRequest, ApiCallback _callback) Build call for cloneExchangecloneExchangeWithHttpInfo(UUID id, CloneRequest cloneRequest) Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance.createExchange(ExchangeCreateRequest exchangeCreateRequest) Create a Cryptographic Exchange in DRAFT Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context.okhttp3.CallcreateExchangeAsync(ExchangeCreateRequest exchangeCreateRequest, ApiCallback<ExchangeDetailResponse> _callback) Create a Cryptographic Exchange in DRAFT (asynchronously) Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context.okhttp3.CallcreateExchangeCall(ExchangeCreateRequest exchangeCreateRequest, ApiCallback _callback) Build call for createExchangecreateExchangeGrant(UUID id, ExchangeGrantRequest exchangeGrantRequest) Add a Capability Grant to an Exchange Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange.okhttp3.CallcreateExchangeGrantAsync(UUID id, ExchangeGrantRequest exchangeGrantRequest, ApiCallback<CapabilityGrantResponse> _callback) Add a Capability Grant to an Exchange (asynchronously) Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange.okhttp3.CallcreateExchangeGrantCall(UUID id, ExchangeGrantRequest exchangeGrantRequest, ApiCallback _callback) Build call for createExchangeGrantcreateExchangeGrantWithHttpInfo(UUID id, ExchangeGrantRequest exchangeGrantRequest) Add a Capability Grant to an Exchange Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange.createExchangeWithHttpInfo(ExchangeCreateRequest exchangeCreateRequest) Create a Cryptographic Exchange in DRAFT Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context.voiddiscardDraft(UUID id, Integer version) Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated.okhttp3.CalldiscardDraftAsync(UUID id, Integer version, ApiCallback<Void> _callback) Discard a draft (DRAFT/READY) Exchange (asynchronously) Soft-deletes an Exchange that has NOT yet been activated.okhttp3.CalldiscardDraftCall(UUID id, Integer version, ApiCallback _callback) Build call for discardDraftdiscardDraftWithHttpInfo(UUID id, Integer version) Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated.Get Cryptographic Exchange detail Returns the full eager-loaded Exchange detail.okhttp3.CallgetByIdAsync(UUID id, ApiCallback<ExchangeDetailResponse> _callback) Get Cryptographic Exchange detail (asynchronously) Returns the full eager-loaded Exchange detail.okhttp3.CallgetByIdCall(UUID id, ApiCallback _callback) Build call for getByIdGet Cryptographic Exchange detail Returns the full eager-loaded Exchange detail.intlistExchanges(String status, String counterparty, UUID applicationId, String relationship, UUID exchangeContextId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection) List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants.okhttp3.CalllistExchangesAsync(String status, String counterparty, UUID applicationId, String relationship, UUID exchangeContextId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection, ApiCallback<PageExchangeListItemResponse> _callback) List Cryptographic Exchanges (asynchronously) Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants.okhttp3.CalllistExchangesCall(String status, String counterparty, UUID applicationId, String relationship, UUID exchangeContextId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection, ApiCallback _callback) Build call for listExchangeslistExchangesWithHttpInfo(String status, String counterparty, UUID applicationId, String relationship, UUID exchangeContextId, UUID ownerPrincipalId, String nameSearch, Integer page, Integer size, String sortBy, String sortDirection) List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants.Preview what activating or resuming this Exchange would confer — writes nothing Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything.okhttp3.CallPreview what activating or resuming this Exchange would confer — writes nothing (asynchronously) Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything.okhttp3.CallpreviewExchangeActivationCall(UUID id, ApiCallback _callback) Build call for previewExchangeActivationPreview what activating or resuming this Exchange would confer — writes nothing Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything.resumeExchange(UUID id, ResumeExchangeRequest resumeExchangeRequest) Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection.okhttp3.CallresumeExchangeAsync(UUID id, ResumeExchangeRequest resumeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate (asynchronously) Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection.okhttp3.CallresumeExchangeCall(UUID id, ResumeExchangeRequest resumeExchangeRequest, ApiCallback _callback) Build call for resumeExchangeresumeExchangeWithHttpInfo(UUID id, ResumeExchangeRequest resumeExchangeRequest) Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection.revokeExchange(UUID id, RevokeExchangeRequest revokeExchangeRequest) Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection.okhttp3.CallrevokeExchangeAsync(UUID id, RevokeExchangeRequest revokeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) Revoke Exchange (any non-terminal -> REVOKED) — irreversible (asynchronously) Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection.okhttp3.CallrevokeExchangeCall(UUID id, RevokeExchangeRequest revokeExchangeRequest, ApiCallback _callback) Build call for revokeExchangevoidrevokeExchangeGrant(UUID id, UUID grantId, RevokeExchangeGrantRequest revokeExchangeGrantRequest) Revoke a Capability Grant of an Exchange Revokes one grant the Exchange owns, with the operator's reason.okhttp3.CallrevokeExchangeGrantAsync(UUID id, UUID grantId, RevokeExchangeGrantRequest revokeExchangeGrantRequest, ApiCallback<Void> _callback) Revoke a Capability Grant of an Exchange (asynchronously) Revokes one grant the Exchange owns, with the operator's reason.okhttp3.CallrevokeExchangeGrantCall(UUID id, UUID grantId, RevokeExchangeGrantRequest revokeExchangeGrantRequest, ApiCallback _callback) Build call for revokeExchangeGrantrevokeExchangeGrantWithHttpInfo(UUID id, UUID grantId, RevokeExchangeGrantRequest revokeExchangeGrantRequest) Revoke a Capability Grant of an Exchange Revokes one grant the Exchange owns, with the operator's reason.revokeExchangeWithHttpInfo(UUID id, RevokeExchangeRequest revokeExchangeRequest) Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) suspendExchange(UUID id, SuspendExchangeRequest suspendExchangeRequest) Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied.okhttp3.CallsuspendExchangeAsync(UUID id, SuspendExchangeRequest suspendExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) Suspend Exchange (ACTIVE -> SUSPENDED) (asynchronously) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied.okhttp3.CallsuspendExchangeCall(UUID id, SuspendExchangeRequest suspendExchangeRequest, ApiCallback _callback) Build call for suspendExchangesuspendExchangeWithHttpInfo(UUID id, SuspendExchangeRequest suspendExchangeRequest) Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied.updateExchange(UUID id, ExchangeUpdateRequest exchangeUpdateRequest) Update Exchange in DRAFT or READY PATCH-style update.okhttp3.CallupdateExchangeAsync(UUID id, ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback<ExchangeDetailResponse> _callback) Update Exchange in DRAFT or READY (asynchronously) PATCH-style update.okhttp3.CallupdateExchangeCall(UUID id, ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback _callback) Build call for updateExchangeupdateExchangeWithHttpInfo(UUID id, ExchangeUpdateRequest exchangeUpdateRequest) Update Exchange in DRAFT or READY PATCH-style update.validateExchange(UUID id) Validate Exchange (DRAFT to READY) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>).okhttp3.CallvalidateExchangeAsync(UUID id, ApiCallback<ValidationResultResponse> _callback) Validate Exchange (DRAFT to READY) (asynchronously) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>).okhttp3.CallvalidateExchangeCall(UUID id, ApiCallback _callback) Build call for validateExchangeValidate Exchange (DRAFT to READY) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>).
-
Constructor Details
-
CryptographicExchangesApi
public CryptographicExchangesApi() -
CryptographicExchangesApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
activateExchangeCall
public okhttp3.Call activateExchangeCall(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest, ApiCallback _callback) throws ApiException Build call for activateExchange- Parameters:
id- Exchange UUID (required)activateRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
activateExchange
public ExchangeDetailResponse activateExchange(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest) throws ApiException Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize Moves a READY Exchange to ACTIVE. Activation creates no grant: the grants were added with <code>createExchangeGrant</code>, each one planned then with the conferring authority and refused when it would overlap a live grant of its actor. Activation makes every live grant the Exchange owns authorize, so the body carries the optimistic-lock <code>version</code> and nothing else. <b>Refusal order</b>: 404 unknown Exchange; 409 <code>exchange-context-not-active</code> when its Exchange Context is not ACTIVE; 422 <code>exchange-not-activatable</code> when it is not READY; 409 stale version; 409 <code>exchange-not-activatable</code> when it owns no live grant; then, per grant, 422 when a Key ID it names is no longer a live key (<code>asset-key-not-resolvable</code>) or its Actor is not ACTIVE (<code>actor-not-active</code>). Nothing is written on any refusal. <b>Activation makes standing authority effective</b>, so it is refused outright under a support-access impersonation session. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything.- Parameters:
id- Exchange UUID (required)activateRequest- (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
activateExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> activateExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest) throws ApiException Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize Moves a READY Exchange to ACTIVE. Activation creates no grant: the grants were added with <code>createExchangeGrant</code>, each one planned then with the conferring authority and refused when it would overlap a live grant of its actor. Activation makes every live grant the Exchange owns authorize, so the body carries the optimistic-lock <code>version</code> and nothing else. <b>Refusal order</b>: 404 unknown Exchange; 409 <code>exchange-context-not-active</code> when its Exchange Context is not ACTIVE; 422 <code>exchange-not-activatable</code> when it is not READY; 409 stale version; 409 <code>exchange-not-activatable</code> when it owns no live grant; then, per grant, 422 when a Key ID it names is no longer a live key (<code>asset-key-not-resolvable</code>) or its Actor is not ACTIVE (<code>actor-not-active</code>). Nothing is written on any refusal. <b>Activation makes standing authority effective</b>, so it is refused outright under a support-access impersonation session. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything.- Parameters:
id- Exchange UUID (required)activateRequest- (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
activateExchangeAsync
public okhttp3.Call activateExchangeAsync(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Activate Exchange (READY -> ACTIVE) — every live grant starts to authorize (asynchronously) Moves a READY Exchange to ACTIVE. Activation creates no grant: the grants were added with <code>createExchangeGrant</code>, each one planned then with the conferring authority and refused when it would overlap a live grant of its actor. Activation makes every live grant the Exchange owns authorize, so the body carries the optimistic-lock <code>version</code> and nothing else. <b>Refusal order</b>: 404 unknown Exchange; 409 <code>exchange-context-not-active</code> when its Exchange Context is not ACTIVE; 422 <code>exchange-not-activatable</code> when it is not READY; 409 stale version; 409 <code>exchange-not-activatable</code> when it owns no live grant; then, per grant, 422 when a Key ID it names is no longer a live key (<code>asset-key-not-resolvable</code>) or its Actor is not ACTIVE (<code>actor-not-active</code>). Nothing is written on any refusal. <b>Activation makes standing authority effective</b>, so it is refused outright under a support-access impersonation session. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything.- Parameters:
id- Exchange UUID (required)activateRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
cloneExchangeCall
public okhttp3.Call cloneExchangeCall(@Nonnull UUID id, @Nullable CloneRequest cloneRequest, ApiCallback _callback) throws ApiException Build call for cloneExchange- Parameters:
id- (required)cloneRequest- (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
cloneExchange
public ExchangeDetailResponse cloneExchange(@Nonnull UUID id, @Nullable CloneRequest cloneRequest) throws ApiException Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
id- (required)cloneRequest- (optional)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
cloneExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> cloneExchangeWithHttpInfo(@Nonnull UUID id, @Nullable CloneRequest cloneRequest) throws ApiException Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
id- (required)cloneRequest- (optional)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
cloneExchangeAsync
public okhttp3.Call cloneExchangeAsync(@Nonnull UUID id, @Nullable CloneRequest cloneRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Clone Exchange to DRAFT (asynchronously) Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
id- (required)cloneRequest- (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
createExchangeCall
public okhttp3.Call createExchangeCall(@Nonnull ExchangeCreateRequest exchangeCreateRequest, ApiCallback _callback) throws ApiException Build call for createExchange- Parameters:
exchangeCreateRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createExchange
public ExchangeDetailResponse createExchange(@Nonnull ExchangeCreateRequest exchangeCreateRequest) throws ApiException Create a Cryptographic Exchange in DRAFT Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context. The response carries the derived <code>relationship</code>: SELF (A to A), INTERNAL (A to B), OUTBOUND (A to external), INBOUND (external to A). Grants are added afterwards with <code>createExchangeGrant</code>. The Exchange Context and every application id are resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. A counterparty type must be platform-global or the caller tenant's own; any other is the same 404. The Exchange Context must be ACTIVE (409 <code>exchange-context-not-active</code>). <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
exchangeCreateRequest- (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> createExchangeWithHttpInfo(@Nonnull ExchangeCreateRequest exchangeCreateRequest) throws ApiException Create a Cryptographic Exchange in DRAFT Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context. The response carries the derived <code>relationship</code>: SELF (A to A), INTERNAL (A to B), OUTBOUND (A to external), INBOUND (external to A). Grants are added afterwards with <code>createExchangeGrant</code>. The Exchange Context and every application id are resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. A counterparty type must be platform-global or the caller tenant's own; any other is the same 404. The Exchange Context must be ACTIVE (409 <code>exchange-context-not-active</code>). <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
exchangeCreateRequest- (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExchangeAsync
public okhttp3.Call createExchangeAsync(@Nonnull ExchangeCreateRequest exchangeCreateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Create a Cryptographic Exchange in DRAFT (asynchronously) Creates one directed relationship in DRAFT: an <code>origin</code> and a <code>destination</code>, each an application of the tenant (<code>applicationId</code>) or an external counterparty (<code>counterparty</code>, with an optional <code>counterpartyTypeId</code>), never external on both ends, in one Exchange Context. The response carries the derived <code>relationship</code>: SELF (A to A), INTERNAL (A to B), OUTBOUND (A to external), INBOUND (external to A). Grants are added afterwards with <code>createExchangeGrant</code>. The Exchange Context and every application id are resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. A counterparty type must be platform-global or the caller tenant's own; any other is the same 404. The Exchange Context must be ACTIVE (409 <code>exchange-context-not-active</code>). <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.- Parameters:
exchangeCreateRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
createExchangeGrantCall
public okhttp3.Call createExchangeGrantCall(@Nonnull UUID id, @Nonnull ExchangeGrantRequest exchangeGrantRequest, ApiCallback _callback) throws ApiException Build call for createExchangeGrant- Parameters:
id- Exchange UUID (required)exchangeGrantRequest- The grant to add: its actor, capabilities, one Key ID or ordered key pairs, and an optional Constraint Policy. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
createExchangeGrant
public CapabilityGrantResponse createExchangeGrant(@Nonnull UUID id, @Nonnull ExchangeGrantRequest exchangeGrantRequest) throws ApiException Add a Capability Grant to an Exchange Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange. The grant authorizes only while the Exchange is ACTIVE: added to a DRAFT, READY or SUSPENDED Exchange it is held until activation or resume. The grant is written through the same path as <code>createCapabilityGrant</code>, with the same refusals: 404 for an actor, Constraint Policy or Key ID that does not resolve in the caller's tenant; 422 for an actor an Internal Crypto Use Case owns; 422 when a key cannot carry a capability; 422 when the actor is not ACTIVE; 409 <code>exchange-context-not-active</code>; 409 <code>capability-grant-overlap</code> when it would overlap a live grant of the actor, in this or another context; and 403 <code>conferring-authority-required</code> when it would add an operation scope to the actor and the caller does not hold <code>admin.tenant.actor.roles.assign</code>. A basic grant names exactly one Key ID (an Exchange grant is never a wildcard); a REENCRYPT or RESIGN grant names 1..32 ordered <code>keyPairs</code>, each authorizing its own direction only. The grant's actor must belong to the Exchange's origin or destination application (422 <code>exchange-grant-actor-not-participant</code>). A terminal Exchange accepts no grant (422 <code>exchange-not-editable</code>). The operation is refused under a support-access impersonation session. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.create</code>.- Parameters:
id- Exchange UUID (required)exchangeGrantRequest- The grant to add: its actor, capabilities, one Key ID or ordered key pairs, and an optional Constraint Policy. (required)- Returns:
- CapabilityGrantResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExchangeGrantWithHttpInfo
public ApiResponse<CapabilityGrantResponse> createExchangeGrantWithHttpInfo(@Nonnull UUID id, @Nonnull ExchangeGrantRequest exchangeGrantRequest) throws ApiException Add a Capability Grant to an Exchange Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange. The grant authorizes only while the Exchange is ACTIVE: added to a DRAFT, READY or SUSPENDED Exchange it is held until activation or resume. The grant is written through the same path as <code>createCapabilityGrant</code>, with the same refusals: 404 for an actor, Constraint Policy or Key ID that does not resolve in the caller's tenant; 422 for an actor an Internal Crypto Use Case owns; 422 when a key cannot carry a capability; 422 when the actor is not ACTIVE; 409 <code>exchange-context-not-active</code>; 409 <code>capability-grant-overlap</code> when it would overlap a live grant of the actor, in this or another context; and 403 <code>conferring-authority-required</code> when it would add an operation scope to the actor and the caller does not hold <code>admin.tenant.actor.roles.assign</code>. A basic grant names exactly one Key ID (an Exchange grant is never a wildcard); a REENCRYPT or RESIGN grant names 1..32 ordered <code>keyPairs</code>, each authorizing its own direction only. The grant's actor must belong to the Exchange's origin or destination application (422 <code>exchange-grant-actor-not-participant</code>). A terminal Exchange accepts no grant (422 <code>exchange-not-editable</code>). The operation is refused under a support-access impersonation session. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.create</code>.- Parameters:
id- Exchange UUID (required)exchangeGrantRequest- The grant to add: its actor, capabilities, one Key ID or ordered key pairs, and an optional Constraint Policy. (required)- Returns:
- ApiResponse<CapabilityGrantResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
createExchangeGrantAsync
public okhttp3.Call createExchangeGrantAsync(@Nonnull UUID id, @Nonnull ExchangeGrantRequest exchangeGrantRequest, ApiCallback<CapabilityGrantResponse> _callback) throws ApiException Add a Capability Grant to an Exchange (asynchronously) Creates a Capability Grant owned by the Exchange, in the Exchange's Exchange Context, on any non-terminal Exchange. The grant authorizes only while the Exchange is ACTIVE: added to a DRAFT, READY or SUSPENDED Exchange it is held until activation or resume. The grant is written through the same path as <code>createCapabilityGrant</code>, with the same refusals: 404 for an actor, Constraint Policy or Key ID that does not resolve in the caller's tenant; 422 for an actor an Internal Crypto Use Case owns; 422 when a key cannot carry a capability; 422 when the actor is not ACTIVE; 409 <code>exchange-context-not-active</code>; 409 <code>capability-grant-overlap</code> when it would overlap a live grant of the actor, in this or another context; and 403 <code>conferring-authority-required</code> when it would add an operation scope to the actor and the caller does not hold <code>admin.tenant.actor.roles.assign</code>. A basic grant names exactly one Key ID (an Exchange grant is never a wildcard); a REENCRYPT or RESIGN grant names 1..32 ordered <code>keyPairs</code>, each authorizing its own direction only. The grant's actor must belong to the Exchange's origin or destination application (422 <code>exchange-grant-actor-not-participant</code>). A terminal Exchange accepts no grant (422 <code>exchange-not-editable</code>). The operation is refused under a support-access impersonation session. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.create</code>.- Parameters:
id- Exchange UUID (required)exchangeGrantRequest- The grant to add: its actor, capabilities, one Key ID or ordered key pairs, and an optional Constraint Policy. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
discardDraftCall
public okhttp3.Call discardDraftCall(@Nonnull UUID id, @Nonnull Integer version, ApiCallback _callback) throws ApiException Build call for discardDraft- Parameters:
id- Stable Exchange UUID (required)version- Expected @Version (optimistic-lock discriminator) (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
discardDraft
Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`- Parameters:
id- Stable Exchange UUID (required)version- Expected @Version (optimistic-lock discriminator) (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
discardDraftWithHttpInfo
public ApiResponse<Void> discardDraftWithHttpInfo(@Nonnull UUID id, @Nonnull Integer version) throws ApiException Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`- Parameters:
id- Stable Exchange UUID (required)version- Expected @Version (optimistic-lock discriminator) (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
discardDraftAsync
public okhttp3.Call discardDraftAsync(@Nonnull UUID id, @Nonnull Integer version, ApiCallback<Void> _callback) throws ApiException Discard a draft (DRAFT/READY) Exchange (asynchronously) Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`- Parameters:
id- Stable Exchange UUID (required)version- Expected @Version (optimistic-lock discriminator) (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
getByIdCall
Build call for getById- Parameters:
id- Stable Exchange UUID (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
getById
Get Cryptographic Exchange detail Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.- Parameters:
id- Stable Exchange UUID (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getByIdWithHttpInfo
public ApiResponse<ExchangeDetailResponse> getByIdWithHttpInfo(@Nonnull UUID id) throws ApiException Get Cryptographic Exchange detail Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.- Parameters:
id- Stable Exchange UUID (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
getByIdAsync
public okhttp3.Call getByIdAsync(@Nonnull UUID id, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Get Cryptographic Exchange detail (asynchronously) Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.- Parameters:
id- Stable Exchange UUID (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
listExchangesCall
public okhttp3.Call listExchangesCall(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable String relationship, @Nullable UUID exchangeContextId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection, ApiCallback _callback) throws ApiException Build call for listExchanges- Parameters:
status- Lifecycle status filter (optional) (optional)counterparty- External counterparty substring, either endpoint (case-insensitive, optional) (optional)applicationId- Application UUID filter, either endpoint (optional) (optional)relationship- Relationship filter (optional): SELF, INTERNAL, OUTBOUND or INBOUND (optional)exchangeContextId- Exchange Context UUID filter (optional) (optional)ownerPrincipalId- Owner principal UUID filter (optional) (optional)nameSearch- Name substring (case-insensitive, optional) (optional)page- Page index (0-based) (optional, default to 0)size- Page size, 1 to 50. (optional, default to 20)sortBy- Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)sortDirection- Sort direction (ASC or DESC) (optional, default to DESC)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
listExchanges
public PageExchangeListItemResponse listExchanges(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable String relationship, @Nullable UUID exchangeContextId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection) throws ApiException List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants. Filter by status, external counterparty (case-insensitive substring, either endpoint), application UUID (either endpoint), relationship (SELF, INTERNAL, OUTBOUND, INBOUND), Exchange Context UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`; rows that tie on the sort field are ordered by id ascending, so a row keeps its place across pages. Page size is bounded to 50.- Parameters:
status- Lifecycle status filter (optional) (optional)counterparty- External counterparty substring, either endpoint (case-insensitive, optional) (optional)applicationId- Application UUID filter, either endpoint (optional) (optional)relationship- Relationship filter (optional): SELF, INTERNAL, OUTBOUND or INBOUND (optional)exchangeContextId- Exchange Context UUID filter (optional) (optional)ownerPrincipalId- Owner principal UUID filter (optional) (optional)nameSearch- Name substring (case-insensitive, optional) (optional)page- Page index (0-based) (optional, default to 0)size- Page size, 1 to 50. (optional, default to 20)sortBy- Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)sortDirection- Sort direction (ASC or DESC) (optional, default to DESC)- Returns:
- PageExchangeListItemResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listExchangesWithHttpInfo
public ApiResponse<PageExchangeListItemResponse> listExchangesWithHttpInfo(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable String relationship, @Nullable UUID exchangeContextId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection) throws ApiException List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants. Filter by status, external counterparty (case-insensitive substring, either endpoint), application UUID (either endpoint), relationship (SELF, INTERNAL, OUTBOUND, INBOUND), Exchange Context UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`; rows that tie on the sort field are ordered by id ascending, so a row keeps its place across pages. Page size is bounded to 50.- Parameters:
status- Lifecycle status filter (optional) (optional)counterparty- External counterparty substring, either endpoint (case-insensitive, optional) (optional)applicationId- Application UUID filter, either endpoint (optional) (optional)relationship- Relationship filter (optional): SELF, INTERNAL, OUTBOUND or INBOUND (optional)exchangeContextId- Exchange Context UUID filter (optional) (optional)ownerPrincipalId- Owner principal UUID filter (optional) (optional)nameSearch- Name substring (case-insensitive, optional) (optional)page- Page index (0-based) (optional, default to 0)size- Page size, 1 to 50. (optional, default to 20)sortBy- Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)sortDirection- Sort direction (ASC or DESC) (optional, default to DESC)- Returns:
- ApiResponse<PageExchangeListItemResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
listExchangesAsync
public okhttp3.Call listExchangesAsync(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable String relationship, @Nullable UUID exchangeContextId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection, ApiCallback<PageExchangeListItemResponse> _callback) throws ApiException List Cryptographic Exchanges (asynchronously) Returns a paginated list of Exchanges in the caller's tenant, each with its endpoints, relationship, Exchange Context, status and grants. Filter by status, external counterparty (case-insensitive substring, either endpoint), application UUID (either endpoint), relationship (SELF, INTERNAL, OUTBOUND, INBOUND), Exchange Context UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`; rows that tie on the sort field are ordered by id ascending, so a row keeps its place across pages. Page size is bounded to 50.- Parameters:
status- Lifecycle status filter (optional) (optional)counterparty- External counterparty substring, either endpoint (case-insensitive, optional) (optional)applicationId- Application UUID filter, either endpoint (optional) (optional)relationship- Relationship filter (optional): SELF, INTERNAL, OUTBOUND or INBOUND (optional)exchangeContextId- Exchange Context UUID filter (optional) (optional)ownerPrincipalId- Owner principal UUID filter (optional) (optional)nameSearch- Name substring (case-insensitive, optional) (optional)page- Page index (0-based) (optional, default to 0)size- Page size, 1 to 50. (optional, default to 20)sortBy- Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)sortDirection- Sort direction (ASC or DESC) (optional, default to DESC)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
previewExchangeActivationCall
public okhttp3.Call previewExchangeActivationCall(@Nonnull UUID id, ApiCallback _callback) throws ApiException Build call for previewExchangeActivation- Parameters:
id- Exchange UUID (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
previewExchangeActivation
public ExchangeActivationPreviewResponse previewExchangeActivation(@Nonnull UUID id) throws ApiException Preview what activating or resuming this Exchange would confer — writes nothing Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything. Every refusal comes from the same computation the write performs. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>grants</code> carries one plan per live grant. An Exchange with no live grant carries the activation's own refusal as <code>refusal</code>.</li> <li><code>RESTORE</code> (SUSPENDED) — each plan describes what resuming brings back; its <code>toAdd</code> is what RETURNS.</li> <li><code>NONE</code> (ACTIVE) — each plan describes a grant already in force, with nothing to add.</li> </ul> DRAFT, REVOKED, EXPIRED and CONSUMED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately: this GET previews a conferral. It is NOT refused under impersonation: it writes nothing and confers nothing.- Parameters:
id- Exchange UUID (required)- Returns:
- ExchangeActivationPreviewResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
previewExchangeActivationWithHttpInfo
public ApiResponse<ExchangeActivationPreviewResponse> previewExchangeActivationWithHttpInfo(@Nonnull UUID id) throws ApiException Preview what activating or resuming this Exchange would confer — writes nothing Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything. Every refusal comes from the same computation the write performs. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>grants</code> carries one plan per live grant. An Exchange with no live grant carries the activation's own refusal as <code>refusal</code>.</li> <li><code>RESTORE</code> (SUSPENDED) — each plan describes what resuming brings back; its <code>toAdd</code> is what RETURNS.</li> <li><code>NONE</code> (ACTIVE) — each plan describes a grant already in force, with nothing to add.</li> </ul> DRAFT, REVOKED, EXPIRED and CONSUMED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately: this GET previews a conferral. It is NOT refused under impersonation: it writes nothing and confers nothing.- Parameters:
id- Exchange UUID (required)- Returns:
- ApiResponse<ExchangeActivationPreviewResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
previewExchangeActivationAsync
public okhttp3.Call previewExchangeActivationAsync(@Nonnull UUID id, ApiCallback<ExchangeActivationPreviewResponse> _callback) throws ApiException Preview what activating or resuming this Exchange would confer — writes nothing (asynchronously) Returns, grant by grant, the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes each grant would confer, without writing anything. Every refusal comes from the same computation the write performs. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>grants</code> carries one plan per live grant. An Exchange with no live grant carries the activation's own refusal as <code>refusal</code>.</li> <li><code>RESTORE</code> (SUSPENDED) — each plan describes what resuming brings back; its <code>toAdd</code> is what RETURNS.</li> <li><code>NONE</code> (ACTIVE) — each plan describes a grant already in force, with nothing to add.</li> </ul> DRAFT, REVOKED, EXPIRED and CONSUMED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately: this GET previews a conferral. It is NOT refused under impersonation: it writes nothing and confers nothing.- Parameters:
id- Exchange UUID (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
resumeExchangeCall
public okhttp3.Call resumeExchangeCall(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest, ApiCallback _callback) throws ApiException Build call for resumeExchange- Parameters:
id- (required)resumeExchangeRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
resumeExchange
public ExchangeDetailResponse resumeExchange(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest) throws ApiException Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>Every Key ID a live grant names must still name a live key</b>, and <b>every grant's Actor must be ACTIVE</b>: resuming makes each grant effective again, which is standing authority on its Actor. A Key ID that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, a non-ACTIVE Actor with 422 <code>actor-not-active</code> - the same refusals activation returns - and nothing is written. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.- Parameters:
id- (required)resumeExchangeRequest- (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
resumeExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> resumeExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest) throws ApiException Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>Every Key ID a live grant names must still name a live key</b>, and <b>every grant's Actor must be ACTIVE</b>: resuming makes each grant effective again, which is standing authority on its Actor. A Key ID that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, a non-ACTIVE Actor with 422 <code>actor-not-active</code> - the same refusals activation returns - and nothing is written. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.- Parameters:
id- (required)resumeExchangeRequest- (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
resumeExchangeAsync
public okhttp3.Call resumeExchangeAsync(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate (asynchronously) Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes every Capability Grant the Exchange owns projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>Every Key ID a live grant names must still name a live key</b>, and <b>every grant's Actor must be ACTIVE</b>: resuming makes each grant effective again, which is standing authority on its Actor. A Key ID that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, a non-ACTIVE Actor with 422 <code>actor-not-active</code> - the same refusals activation returns - and nothing is written. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.- Parameters:
id- (required)resumeExchangeRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
revokeExchangeCall
public okhttp3.Call revokeExchangeCall(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest, ApiCallback _callback) throws ApiException Build call for revokeExchange- Parameters:
id- (required)revokeExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
revokeExchange
public ExchangeDetailResponse revokeExchange(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest) throws ApiException Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.- Parameters:
id- (required)revokeExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
revokeExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> revokeExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest) throws ApiException Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.- Parameters:
id- (required)revokeExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
revokeExchangeAsync
public okhttp3.Call revokeExchangeAsync(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Revoke Exchange (any non-terminal -> REVOKED) — irreversible (asynchronously) Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.- Parameters:
id- (required)revokeExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
revokeExchangeGrantCall
public okhttp3.Call revokeExchangeGrantCall(@Nonnull UUID id, @Nonnull UUID grantId, @Nonnull RevokeExchangeGrantRequest revokeExchangeGrantRequest, ApiCallback _callback) throws ApiException Build call for revokeExchangeGrant- Parameters:
id- Exchange UUID (required)grantId- Capability Grant UUID (required)revokeExchangeGrantRequest- The operator's reason for revoking the grant. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
revokeExchangeGrant
public void revokeExchangeGrant(@Nonnull UUID id, @Nonnull UUID grantId, @Nonnull RevokeExchangeGrantRequest revokeExchangeGrantRequest) throws ApiException Revoke a Capability Grant of an Exchange Revokes one grant the Exchange owns, with the operator's reason. The Exchange's other grants are unchanged. The last live grant of an ACTIVE or SUSPENDED Exchange is not revoked alone (422 <code>exchange-not-editable</code>): revoke the Exchange to end it, or add another grant first. A terminal Exchange's grants ended with it (422). The reason is required (free text, at most 1,000 bytes in UTF-8). It is recorded as the action reason of the revoked grant's signed audit event and of no other record; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.revoke</code>.- Parameters:
id- Exchange UUID (required)grantId- Capability Grant UUID (required)revokeExchangeGrantRequest- The operator's reason for revoking the grant. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
revokeExchangeGrantWithHttpInfo
public ApiResponse<Void> revokeExchangeGrantWithHttpInfo(@Nonnull UUID id, @Nonnull UUID grantId, @Nonnull RevokeExchangeGrantRequest revokeExchangeGrantRequest) throws ApiException Revoke a Capability Grant of an Exchange Revokes one grant the Exchange owns, with the operator's reason. The Exchange's other grants are unchanged. The last live grant of an ACTIVE or SUSPENDED Exchange is not revoked alone (422 <code>exchange-not-editable</code>): revoke the Exchange to end it, or add another grant first. A terminal Exchange's grants ended with it (422). The reason is required (free text, at most 1,000 bytes in UTF-8). It is recorded as the action reason of the revoked grant's signed audit event and of no other record; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.revoke</code>.- Parameters:
id- Exchange UUID (required)grantId- Capability Grant UUID (required)revokeExchangeGrantRequest- The operator's reason for revoking the grant. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
revokeExchangeGrantAsync
public okhttp3.Call revokeExchangeGrantAsync(@Nonnull UUID id, @Nonnull UUID grantId, @Nonnull RevokeExchangeGrantRequest revokeExchangeGrantRequest, ApiCallback<Void> _callback) throws ApiException Revoke a Capability Grant of an Exchange (asynchronously) Revokes one grant the Exchange owns, with the operator's reason. The Exchange's other grants are unchanged. The last live grant of an ACTIVE or SUSPENDED Exchange is not revoked alone (422 <code>exchange-not-editable</code>): revoke the Exchange to end it, or add another grant first. A terminal Exchange's grants ended with it (422). The reason is required (free text, at most 1,000 bytes in UTF-8). It is recorded as the action reason of the revoked grant's signed audit event and of no other record; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. <b>Authorization</b>: requires BOTH <code>admin.tenant.exchange.update</code> and <code>admin.tenant.capability-grant.revoke</code>.- Parameters:
id- Exchange UUID (required)grantId- Capability Grant UUID (required)revokeExchangeGrantRequest- The operator's reason for revoking the grant. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
suspendExchangeCall
public okhttp3.Call suspendExchangeCall(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest, ApiCallback _callback) throws ApiException Build call for suspendExchange- Parameters:
id- (required)suspendExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
suspendExchange
public ExchangeDetailResponse suspendExchange(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest) throws ApiException Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied. While SUSPENDED the Exchange returns <code>suspendedAt</code>, <code>suspendedBy</code> and <code>suspendedReason</code>; a resume clears them. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.- Parameters:
id- (required)suspendExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
suspendExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> suspendExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest) throws ApiException Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied. While SUSPENDED the Exchange returns <code>suspendedAt</code>, <code>suspendedBy</code> and <code>suspendedReason</code>; a resume clears them. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.- Parameters:
id- (required)suspendExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
suspendExchangeAsync
public okhttp3.Call suspendExchangeAsync(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Suspend Exchange (ACTIVE -> SUSPENDED) (asynchronously) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and withdraws every grant it owns from runtime authorization, so the next request any of them would authorize is denied. While SUSPENDED the Exchange returns <code>suspendedAt</code>, <code>suspendedBy</code> and <code>suspendedReason</code>; a resume clears them. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.- Parameters:
id- (required)suspendExchangeRequest- Optimistic-lock version plus the mandatory operator justification. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
updateExchangeCall
public okhttp3.Call updateExchangeCall(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback _callback) throws ApiException Build call for updateExchange- Parameters:
id- Stable Exchange UUID (required)exchangeUpdateRequest- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
updateExchange
public ExchangeDetailResponse updateExchange(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest) throws ApiException Update Exchange in DRAFT or READY PATCH-style update. All fields except `version` are optional. The endpoints and the Exchange Context are editable only while the Exchange is DRAFT or READY; changing one on a READY Exchange demotes it to DRAFT, in the one update event that records both. ACTIVE, SUSPENDED and terminal Exchanges are refused with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code>. A named Exchange Context, application or counterparty type that does not resolve for the caller's tenant is refused with 404 <code>not-found</code> before any field is applied. An Exchange that owns a live grant keeps its context (422 <code>exchange-not-editable</code>): its grants authorize in it. A changed endpoint that would leave a live grant's actor outside both endpoints is refused with 422 <code>exchange-grant-actor-not-participant</code>. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Stable Exchange UUID (required)exchangeUpdateRequest- (required)- Returns:
- ExchangeDetailResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateExchangeWithHttpInfo
public ApiResponse<ExchangeDetailResponse> updateExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest) throws ApiException Update Exchange in DRAFT or READY PATCH-style update. All fields except `version` are optional. The endpoints and the Exchange Context are editable only while the Exchange is DRAFT or READY; changing one on a READY Exchange demotes it to DRAFT, in the one update event that records both. ACTIVE, SUSPENDED and terminal Exchanges are refused with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code>. A named Exchange Context, application or counterparty type that does not resolve for the caller's tenant is refused with 404 <code>not-found</code> before any field is applied. An Exchange that owns a live grant keeps its context (422 <code>exchange-not-editable</code>): its grants authorize in it. A changed endpoint that would leave a live grant's actor outside both endpoints is refused with 422 <code>exchange-grant-actor-not-participant</code>. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Stable Exchange UUID (required)exchangeUpdateRequest- (required)- Returns:
- ApiResponse<ExchangeDetailResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
updateExchangeAsync
public okhttp3.Call updateExchangeAsync(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException Update Exchange in DRAFT or READY (asynchronously) PATCH-style update. All fields except `version` are optional. The endpoints and the Exchange Context are editable only while the Exchange is DRAFT or READY; changing one on a READY Exchange demotes it to DRAFT, in the one update event that records both. ACTIVE, SUSPENDED and terminal Exchanges are refused with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code>. A named Exchange Context, application or counterparty type that does not resolve for the caller's tenant is refused with 404 <code>not-found</code> before any field is applied. An Exchange that owns a live grant keeps its context (422 <code>exchange-not-editable</code>): its grants authorize in it. A changed endpoint that would leave a live grant's actor outside both endpoints is refused with 422 <code>exchange-grant-actor-not-participant</code>. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Stable Exchange UUID (required)exchangeUpdateRequest- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
validateExchangeCall
public okhttp3.Call validateExchangeCall(@Nonnull UUID id, ApiCallback _callback) throws ApiException Build call for validateExchange- Parameters:
id- Exchange UUID (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
validateExchange
Validate Exchange (DRAFT to READY) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>). That the references belong to the caller's tenant is not a predicate here: every one was resolved inside the tenant when it was written. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>Every Key ID of a live grant must name a live key</b>. A Key ID, a basic grant's or either end of a key pair, that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>grants</code> - the same violation, with the same message, whether the Key ID never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. An Exchange with no live grant validates; activation is what requires one. Re-validating a READY Exchange changes nothing; editing the endpoints or the context of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the keys can perform the grants' capabilities</b>. That is checked when a grant is added and again at ACTIVATION, against each key's provisioned <code>key_ops</code>, state, purpose and algorithm — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn what activation would confer before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Exchange UUID (required)- Returns:
- ValidationResultResponse
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
validateExchangeWithHttpInfo
public ApiResponse<ValidationResultResponse> validateExchangeWithHttpInfo(@Nonnull UUID id) throws ApiException Validate Exchange (DRAFT to READY) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>). That the references belong to the caller's tenant is not a predicate here: every one was resolved inside the tenant when it was written. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>Every Key ID of a live grant must name a live key</b>. A Key ID, a basic grant's or either end of a key pair, that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>grants</code> - the same violation, with the same message, whether the Key ID never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. An Exchange with no live grant validates; activation is what requires one. Re-validating a READY Exchange changes nothing; editing the endpoints or the context of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the keys can perform the grants' capabilities</b>. That is checked when a grant is added and again at ACTIVATION, against each key's provisioned <code>key_ops</code>, state, purpose and algorithm — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn what activation would confer before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Exchange UUID (required)- Returns:
- ApiResponse<ValidationResultResponse>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
validateExchangeAsync
public okhttp3.Call validateExchangeAsync(@Nonnull UUID id, ApiCallback<ValidationResultResponse> _callback) throws ApiException Validate Exchange (DRAFT to READY) (asynchronously) Runs the reference and coherence predicates: the Exchange names its Exchange Context and both endpoints (an origin and a destination, at least one of them an application of the tenant), every Key ID a live grant of the Exchange names is a live key in the caller's tenant, and the validity window is coherent (<code>effectiveFrom</code> strictly before <code>effectiveUntil</code>). That the references belong to the caller's tenant is not a predicate here: every one was resolved inside the tenant when it was written. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>Every Key ID of a live grant must name a live key</b>. A Key ID, a basic grant's or either end of a key pair, that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>grants</code> - the same violation, with the same message, whether the Key ID never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. An Exchange with no live grant validates; activation is what requires one. Re-validating a READY Exchange changes nothing; editing the endpoints or the context of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the keys can perform the grants' capabilities</b>. That is checked when a grant is added and again at ACTIVATION, against each key's provisioned <code>key_ops</code>, state, purpose and algorithm — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn what activation would confer before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.- Parameters:
id- Exchange UUID (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-