Class ExchangeContextsApi

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.ExchangeContextsApi

public class ExchangeContextsApi extends Object
  • Constructor Details

    • ExchangeContextsApi

      public ExchangeContextsApi()
    • ExchangeContextsApi

      public ExchangeContextsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • closeExchangeContextCall

      public okhttp3.Call closeExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull CloseExchangeContextRequest closeExchangeContextRequest, ApiCallback _callback) throws ApiException
      Build call for closeExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      closeExchangeContextRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • closeExchangeContext

      public ExchangeContextResponse closeExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull CloseExchangeContextRequest closeExchangeContextRequest) throws ApiException
      Close Exchange Context (permanent, non-reversible) Moves the Exchange Context to CLOSED, which is terminal, and in the same transaction revokes every non-terminal Cryptographic Exchange in it with terminal cause CONTEXT_CLOSED and retires every live Capability Grant in it, whatever owns the grant. The next request through any of those grants is denied. Grants, Exchanges and the audit trail stay readable. The close is recorded as one signed `exchange-context.closed` audit event, whose action reason is the required `reason` of the body, and each revoked Exchange and retired grant as its own audit event naming the close as its cause. The reason is free text of at most 1,000 bytes in UTF-8; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. A context provisioned by an Internal Crypto Use Case is closed only by revoking that use case: closing it here is refused with 409 and changes nothing. Closing an already CLOSED context changes nothing and answers 200.
      Parameters:
      tenantId - (required)
      contextId - (required)
      closeExchangeContextRequest - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • closeExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> closeExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull CloseExchangeContextRequest closeExchangeContextRequest) throws ApiException
      Close Exchange Context (permanent, non-reversible) Moves the Exchange Context to CLOSED, which is terminal, and in the same transaction revokes every non-terminal Cryptographic Exchange in it with terminal cause CONTEXT_CLOSED and retires every live Capability Grant in it, whatever owns the grant. The next request through any of those grants is denied. Grants, Exchanges and the audit trail stay readable. The close is recorded as one signed `exchange-context.closed` audit event, whose action reason is the required `reason` of the body, and each revoked Exchange and retired grant as its own audit event naming the close as its cause. The reason is free text of at most 1,000 bytes in UTF-8; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. A context provisioned by an Internal Crypto Use Case is closed only by revoking that use case: closing it here is refused with 409 and changes nothing. Closing an already CLOSED context changes nothing and answers 200.
      Parameters:
      tenantId - (required)
      contextId - (required)
      closeExchangeContextRequest - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • closeExchangeContextAsync

      public okhttp3.Call closeExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull CloseExchangeContextRequest closeExchangeContextRequest, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Close Exchange Context (permanent, non-reversible) (asynchronously) Moves the Exchange Context to CLOSED, which is terminal, and in the same transaction revokes every non-terminal Cryptographic Exchange in it with terminal cause CONTEXT_CLOSED and retires every live Capability Grant in it, whatever owns the grant. The next request through any of those grants is denied. Grants, Exchanges and the audit trail stay readable. The close is recorded as one signed `exchange-context.closed` audit event, whose action reason is the required `reason` of the body, and each revoked Exchange and retired grant as its own audit event naming the close as its cause. The reason is free text of at most 1,000 bytes in UTF-8; a blank or over-bound reason is 400 and changes nothing, and no refusal or log line repeats it. A context provisioned by an Internal Crypto Use Case is closed only by revoking that use case: closing it here is refused with 409 and changes nothing. Closing an already CLOSED context changes nothing and answers 200.
      Parameters:
      tenantId - (required)
      contextId - (required)
      closeExchangeContextRequest - (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
    • createExchangeContextCall

      public okhttp3.Call createExchangeContextCall(@Nonnull UUID tenantId, @Nonnull CreateExchangeContextRequest createExchangeContextRequest, ApiCallback _callback) throws ApiException
      Build call for createExchangeContext
      Parameters:
      tenantId - (required)
      createExchangeContextRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createExchangeContext

      public ExchangeContextResponse createExchangeContext(@Nonnull UUID tenantId, @Nonnull CreateExchangeContextRequest createExchangeContextRequest) throws ApiException
      Create an Exchange Context in the tenant Creates a governed business scenario owned by the tenant. A context names no application, counterparty or direction: those are the endpoints of the Cryptographic Exchanges created in it, and Capability Grants of any owner belong to it. The context starts ACTIVE and is later suspended, resumed or closed through the dedicated operations. Its `name` is unique among the live contexts of the tenant. `regulatoryRegime` is optional free text of at most 120 characters naming the regime the scenario operates under, such as PCI DSS 4.0.
      Parameters:
      tenantId - (required)
      createExchangeContextRequest - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> createExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull CreateExchangeContextRequest createExchangeContextRequest) throws ApiException
      Create an Exchange Context in the tenant Creates a governed business scenario owned by the tenant. A context names no application, counterparty or direction: those are the endpoints of the Cryptographic Exchanges created in it, and Capability Grants of any owner belong to it. The context starts ACTIVE and is later suspended, resumed or closed through the dedicated operations. Its `name` is unique among the live contexts of the tenant. `regulatoryRegime` is optional free text of at most 120 characters naming the regime the scenario operates under, such as PCI DSS 4.0.
      Parameters:
      tenantId - (required)
      createExchangeContextRequest - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createExchangeContextAsync

      public okhttp3.Call createExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull CreateExchangeContextRequest createExchangeContextRequest, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Create an Exchange Context in the tenant (asynchronously) Creates a governed business scenario owned by the tenant. A context names no application, counterparty or direction: those are the endpoints of the Cryptographic Exchanges created in it, and Capability Grants of any owner belong to it. The context starts ACTIVE and is later suspended, resumed or closed through the dedicated operations. Its `name` is unique among the live contexts of the tenant. `regulatoryRegime` is optional free text of at most 120 characters naming the regime the scenario operates under, such as PCI DSS 4.0.
      Parameters:
      tenantId - (required)
      createExchangeContextRequest - (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
    • deleteExchangeContextCall

      public okhttp3.Call deleteExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback _callback) throws ApiException
      Build call for deleteExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteExchangeContext

      public void deleteExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Soft-delete a CLOSED or PENDING_ACTIVATION Exchange Context
      Parameters:
      tenantId - (required)
      contextId - (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteExchangeContextWithHttpInfo

      public ApiResponse<Void> deleteExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Soft-delete a CLOSED or PENDING_ACTIVATION Exchange Context
      Parameters:
      tenantId - (required)
      contextId - (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteExchangeContextAsync

      public okhttp3.Call deleteExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback<Void> _callback) throws ApiException
      Soft-delete a CLOSED or PENDING_ACTIVATION Exchange Context (asynchronously)
      Parameters:
      tenantId - (required)
      contextId - (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
    • getExchangeContextCall

      public okhttp3.Call getExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback _callback) throws ApiException
      Build call for getExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getExchangeContext

      public ExchangeContextResponse getExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Get Exchange Context details
      Parameters:
      tenantId - (required)
      contextId - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> getExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Get Exchange Context details
      Parameters:
      tenantId - (required)
      contextId - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getExchangeContextAsync

      public okhttp3.Call getExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Get Exchange Context details (asynchronously)
      Parameters:
      tenantId - (required)
      contextId - (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
    • listTenantExchangeContextsCall

      public okhttp3.Call listTenantExchangeContextsCall(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort, ApiCallback _callback) throws ApiException
      Build call for listTenantExchangeContexts
      Parameters:
      tenantId - (required)
      page - Zero-based page index (0..N) (optional, default to 0)
      size - The size of the page to be returned (optional, default to 25)
      sort - Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listTenantExchangeContexts

      public PageExchangeContextResponse listTenantExchangeContexts(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort) throws ApiException
      List Exchange Contexts in tenant
      Parameters:
      tenantId - (required)
      page - Zero-based page index (0..N) (optional, default to 0)
      size - The size of the page to be returned (optional, default to 25)
      sort - Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
      Returns:
      PageExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listTenantExchangeContextsWithHttpInfo

      public ApiResponse<PageExchangeContextResponse> listTenantExchangeContextsWithHttpInfo(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort) throws ApiException
      List Exchange Contexts in tenant
      Parameters:
      tenantId - (required)
      page - Zero-based page index (0..N) (optional, default to 0)
      size - The size of the page to be returned (optional, default to 25)
      sort - Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional)
      Returns:
      ApiResponse<PageExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listTenantExchangeContextsAsync

      public okhttp3.Call listTenantExchangeContextsAsync(@Nonnull UUID tenantId, @Nullable Integer page, @Nullable Integer size, @Nullable List<String> sort, ApiCallback<PageExchangeContextResponse> _callback) throws ApiException
      List Exchange Contexts in tenant (asynchronously)
      Parameters:
      tenantId - (required)
      page - Zero-based page index (0..N) (optional, default to 0)
      size - The size of the page to be returned (optional, default to 25)
      sort - Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (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
    • resumeExchangeContextCall

      public okhttp3.Call resumeExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback _callback) throws ApiException
      Build call for resumeExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • resumeExchangeContext

      public ExchangeContextResponse resumeExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Resume SUSPENDED Exchange Context back to ACTIVE
      Parameters:
      tenantId - (required)
      contextId - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • resumeExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> resumeExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId) throws ApiException
      Resume SUSPENDED Exchange Context back to ACTIVE
      Parameters:
      tenantId - (required)
      contextId - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • resumeExchangeContextAsync

      public okhttp3.Call resumeExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Resume SUSPENDED Exchange Context back to ACTIVE (asynchronously)
      Parameters:
      tenantId - (required)
      contextId - (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
    • suspendExchangeContextCall

      public okhttp3.Call suspendExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull SuspendExchangeContextRequest suspendExchangeContextRequest, ApiCallback _callback) throws ApiException
      Build call for suspendExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      suspendExchangeContextRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • suspendExchangeContext

      public ExchangeContextResponse suspendExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull SuspendExchangeContextRequest suspendExchangeContextRequest) throws ApiException
      Suspend Exchange Context (invalidates all dependent grants) Transitions the Exchange Context to SUSPENDED and propagates an invalidation to every replica of the cryptographic service, which drops its cached entry for every grant bound to this context. A body is REQUIRED and carries a mandatory `reason`. It is recorded verbatim at canonical position 21 of the signed admin audit event, so an audit row cannot say that an Exchange Context was suspended without saying why. 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 -- and it is NEVER written to a log line. IDEMPOTENT NO-OP: an already-SUSPENDED context answers 200 OK and the submitted reason is recorded NOWHERE -- no status write, no audit event, no admin_audit_log row -- because the act did not happen. That is deliberate, not a lost value: recording it would put a justification for a suspension into the trail on a call that suspended nothing.
      Parameters:
      tenantId - (required)
      contextId - (required)
      suspendExchangeContextRequest - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • suspendExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> suspendExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull SuspendExchangeContextRequest suspendExchangeContextRequest) throws ApiException
      Suspend Exchange Context (invalidates all dependent grants) Transitions the Exchange Context to SUSPENDED and propagates an invalidation to every replica of the cryptographic service, which drops its cached entry for every grant bound to this context. A body is REQUIRED and carries a mandatory `reason`. It is recorded verbatim at canonical position 21 of the signed admin audit event, so an audit row cannot say that an Exchange Context was suspended without saying why. 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 -- and it is NEVER written to a log line. IDEMPOTENT NO-OP: an already-SUSPENDED context answers 200 OK and the submitted reason is recorded NOWHERE -- no status write, no audit event, no admin_audit_log row -- because the act did not happen. That is deliberate, not a lost value: recording it would put a justification for a suspension into the trail on a call that suspended nothing.
      Parameters:
      tenantId - (required)
      contextId - (required)
      suspendExchangeContextRequest - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • suspendExchangeContextAsync

      public okhttp3.Call suspendExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull SuspendExchangeContextRequest suspendExchangeContextRequest, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Suspend Exchange Context (invalidates all dependent grants) (asynchronously) Transitions the Exchange Context to SUSPENDED and propagates an invalidation to every replica of the cryptographic service, which drops its cached entry for every grant bound to this context. A body is REQUIRED and carries a mandatory `reason`. It is recorded verbatim at canonical position 21 of the signed admin audit event, so an audit row cannot say that an Exchange Context was suspended without saying why. 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 -- and it is NEVER written to a log line. IDEMPOTENT NO-OP: an already-SUSPENDED context answers 200 OK and the submitted reason is recorded NOWHERE -- no status write, no audit event, no admin_audit_log row -- because the act did not happen. That is deliberate, not a lost value: recording it would put a justification for a suspension into the trail on a call that suspended nothing.
      Parameters:
      tenantId - (required)
      contextId - (required)
      suspendExchangeContextRequest - (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
    • updateExchangeContextCall

      public okhttp3.Call updateExchangeContextCall(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull UpdateExchangeContextRequest updateExchangeContextRequest, ApiCallback _callback) throws ApiException
      Build call for updateExchangeContext
      Parameters:
      tenantId - (required)
      contextId - (required)
      updateExchangeContextRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateExchangeContext

      public ExchangeContextResponse updateExchangeContext(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull UpdateExchangeContextRequest updateExchangeContextRequest) throws ApiException
      Update Exchange Context metadata (PATCH)
      Parameters:
      tenantId - (required)
      contextId - (required)
      updateExchangeContextRequest - (required)
      Returns:
      ExchangeContextResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateExchangeContextWithHttpInfo

      public ApiResponse<ExchangeContextResponse> updateExchangeContextWithHttpInfo(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull UpdateExchangeContextRequest updateExchangeContextRequest) throws ApiException
      Update Exchange Context metadata (PATCH)
      Parameters:
      tenantId - (required)
      contextId - (required)
      updateExchangeContextRequest - (required)
      Returns:
      ApiResponse<ExchangeContextResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateExchangeContextAsync

      public okhttp3.Call updateExchangeContextAsync(@Nonnull UUID tenantId, @Nonnull UUID contextId, @Nonnull UpdateExchangeContextRequest updateExchangeContextRequest, ApiCallback<ExchangeContextResponse> _callback) throws ApiException
      Update Exchange Context metadata (PATCH) (asynchronously)
      Parameters:
      tenantId - (required)
      contextId - (required)
      updateExchangeContextRequest - (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