Class ApiLifecycleApi

java.lang.Object
org.wso2.am.integration.clients.publisher.api.v1.ApiLifecycleApi

public class ApiLifecycleApi extends Object
  • Constructor Details

    • ApiLifecycleApi

      public ApiLifecycleApi()
    • ApiLifecycleApi

      public ApiLifecycleApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • changeAPILifecycleCall

      public okhttp3.Call changeAPILifecycleCall(String action, String apiId, String lifecycleChecklist, String ifMatch, ApiCallback _callback) throws ApiException
      Build call for changeAPILifecycle
      Parameters:
      action - The action to demote or promote the state of the API. Supported actions are [ **Publish**, **Deploy as a Prototype**, **Demote to Created**, **Block**, **Deprecate**, **Re-Publish**, **Retire** ] (required)
      apiId - **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required)
      lifecycleChecklist - Supported checklist items are as follows. 1. **Deprecate old versions after publishing the API**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Requires re-subscription when publishing the API**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. You can specify additional checklist items by using an **\"attribute:\"** modifier. Eg: \"Deprecate old versions after publishing the API:true\" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in \"attribute1:true, attribute2:false\" format. **Sample CURL :** curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate%20old%20versions%20after%20publishing%20the%20API%3Atrue,Requires%20re-subscription%20when%20publishing%20the%20API%3Afalse\" (optional)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • changeAPILifecycle

      public WorkflowResponseDTO changeAPILifecycle(String action, String apiId, String lifecycleChecklist, String ifMatch) throws ApiException
      Change API Status This operation is used to change the lifecycle of an API. Eg: Publish an API which is in `CREATED` state. In order to change the lifecycle, we need to provide the lifecycle `action` as a query parameter. For example, to Publish an API, `action` should be `Publish`. Note that the `Re-publish` action is available only after calling `Block`. Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information.
      Parameters:
      action - The action to demote or promote the state of the API. Supported actions are [ **Publish**, **Deploy as a Prototype**, **Demote to Created**, **Block**, **Deprecate**, **Re-Publish**, **Retire** ] (required)
      apiId - **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required)
      lifecycleChecklist - Supported checklist items are as follows. 1. **Deprecate old versions after publishing the API**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Requires re-subscription when publishing the API**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. You can specify additional checklist items by using an **\"attribute:\"** modifier. Eg: \"Deprecate old versions after publishing the API:true\" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in \"attribute1:true, attribute2:false\" format. **Sample CURL :** curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate%20old%20versions%20after%20publishing%20the%20API%3Atrue,Requires%20re-subscription%20when%20publishing%20the%20API%3Afalse\" (optional)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      WorkflowResponseDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • changeAPILifecycleWithHttpInfo

      public ApiResponse<WorkflowResponseDTO> changeAPILifecycleWithHttpInfo(String action, String apiId, String lifecycleChecklist, String ifMatch) throws ApiException
      Change API Status This operation is used to change the lifecycle of an API. Eg: Publish an API which is in `CREATED` state. In order to change the lifecycle, we need to provide the lifecycle `action` as a query parameter. For example, to Publish an API, `action` should be `Publish`. Note that the `Re-publish` action is available only after calling `Block`. Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information.
      Parameters:
      action - The action to demote or promote the state of the API. Supported actions are [ **Publish**, **Deploy as a Prototype**, **Demote to Created**, **Block**, **Deprecate**, **Re-Publish**, **Retire** ] (required)
      apiId - **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required)
      lifecycleChecklist - Supported checklist items are as follows. 1. **Deprecate old versions after publishing the API**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Requires re-subscription when publishing the API**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. You can specify additional checklist items by using an **\"attribute:\"** modifier. Eg: \"Deprecate old versions after publishing the API:true\" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in \"attribute1:true, attribute2:false\" format. **Sample CURL :** curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate%20old%20versions%20after%20publishing%20the%20API%3Atrue,Requires%20re-subscription%20when%20publishing%20the%20API%3Afalse\" (optional)
      ifMatch - Validator for conditional requests; based on ETag. (optional)
      Returns:
      ApiResponse<WorkflowResponseDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • changeAPILifecycleAsync

      public okhttp3.Call changeAPILifecycleAsync(String action, String apiId, String lifecycleChecklist, String ifMatch, ApiCallback<WorkflowResponseDTO> _callback) throws ApiException
      Change API Status (asynchronously) This operation is used to change the lifecycle of an API. Eg: Publish an API which is in `CREATED` state. In order to change the lifecycle, we need to provide the lifecycle `action` as a query parameter. For example, to Publish an API, `action` should be `Publish`. Note that the `Re-publish` action is available only after calling `Block`. Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information.
      Parameters:
      action - The action to demote or promote the state of the API. Supported actions are [ **Publish**, **Deploy as a Prototype**, **Demote to Created**, **Block**, **Deprecate**, **Re-Publish**, **Retire** ] (required)
      apiId - **API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. (required)
      lifecycleChecklist - Supported checklist items are as follows. 1. **Deprecate old versions after publishing the API**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Requires re-subscription when publishing the API**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. You can specify additional checklist items by using an **\"attribute:\"** modifier. Eg: \"Deprecate old versions after publishing the API:true\" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in \"attribute1:true, attribute2:false\" format. **Sample CURL :** curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X POST \"https://localhost:9443/api/am/publisher/v4/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate%20old%20versions%20after%20publishing%20the%20API%3Atrue,Requires%20re-subscription%20when%20publishing%20the%20API%3Afalse\" (optional)
      ifMatch - Validator for conditional requests; based on ETag. (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
    • deleteAPILifecycleStatePendingTasksCall

      public okhttp3.Call deleteAPILifecycleStatePendingTasksCall(String apiId, ApiCallback _callback) throws ApiException
      Build call for deleteAPILifecycleStatePendingTasks
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteAPILifecycleStatePendingTasks

      public void deleteAPILifecycleStatePendingTasks(String apiId) throws ApiException
      Delete Pending Lifecycle State Change Tasks This operation can be used to remove pending lifecycle state change requests that are in pending state
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAPILifecycleStatePendingTasksWithHttpInfo

      public ApiResponse<Void> deleteAPILifecycleStatePendingTasksWithHttpInfo(String apiId) throws ApiException
      Delete Pending Lifecycle State Change Tasks This operation can be used to remove pending lifecycle state change requests that are in pending state
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAPILifecycleStatePendingTasksAsync

      public okhttp3.Call deleteAPILifecycleStatePendingTasksAsync(String apiId, ApiCallback<Void> _callback) throws ApiException
      Delete Pending Lifecycle State Change Tasks (asynchronously) This operation can be used to remove pending lifecycle state change requests that are in pending state
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (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
    • getAPILifecycleHistoryCall

      public okhttp3.Call getAPILifecycleHistoryCall(String apiId, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPILifecycleHistory
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getAPILifecycleHistory

      public LifecycleHistoryDTO getAPILifecycleHistory(String apiId, String ifNoneMatch) throws ApiException
      Get Lifecycle State Change History of the API. This operation can be used to retrieve Lifecycle state change history of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      LifecycleHistoryDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPILifecycleHistoryWithHttpInfo

      public ApiResponse<LifecycleHistoryDTO> getAPILifecycleHistoryWithHttpInfo(String apiId, String ifNoneMatch) throws ApiException
      Get Lifecycle State Change History of the API. This operation can be used to retrieve Lifecycle state change history of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<LifecycleHistoryDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPILifecycleHistoryAsync

      public okhttp3.Call getAPILifecycleHistoryAsync(String apiId, String ifNoneMatch, ApiCallback<LifecycleHistoryDTO> _callback) throws ApiException
      Get Lifecycle State Change History of the API. (asynchronously) This operation can be used to retrieve Lifecycle state change history of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (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
    • getAPILifecycleStateCall

      public okhttp3.Call getAPILifecycleStateCall(String apiId, String ifNoneMatch, ApiCallback _callback) throws ApiException
      Build call for getAPILifecycleState
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getAPILifecycleState

      public LifecycleStateDTO getAPILifecycleState(String apiId, String ifNoneMatch) throws ApiException
      Get Lifecycle State Data of the API. This operation can be used to retrieve Lifecycle state data of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      LifecycleStateDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPILifecycleStateWithHttpInfo

      public ApiResponse<LifecycleStateDTO> getAPILifecycleStateWithHttpInfo(String apiId, String ifNoneMatch) throws ApiException
      Get Lifecycle State Data of the API. This operation can be used to retrieve Lifecycle state data of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (optional)
      Returns:
      ApiResponse<LifecycleStateDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAPILifecycleStateAsync

      public okhttp3.Call getAPILifecycleStateAsync(String apiId, String ifNoneMatch, ApiCallback<LifecycleStateDTO> _callback) throws ApiException
      Get Lifecycle State Data of the API. (asynchronously) This operation can be used to retrieve Lifecycle state data of the API.
      Parameters:
      apiId - **API ID** consisting of the **UUID** of the API. (required)
      ifNoneMatch - Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. (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