Class RestAPIPublisherImpl


  • public class RestAPIPublisherImpl
    extends Object
    This util class performs the actions related to APIDTOobjects.
    • Constructor Detail

      • RestAPIPublisherImpl

        @Deprecated
        public RestAPIPublisherImpl()
        Deprecated.
      • RestAPIPublisherImpl

        public RestAPIPublisherImpl​(String username,
                                    String password,
                                    String tenantDomain,
                                    String publisherURL)
    • Method Detail

      • getAccessToken

        public String getAccessToken()
      • setAccessToken

        public void setAccessToken​(String accessToken)
      • addAPI

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addAPI​(APIRequest apiRequest)
                                                                              throws ApiException
        \ This method is used to create an API.
        Parameters:
        apiRequest -
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API.
      • addAPI

        public APIDTO addAPI​(APIRequest apiRequest,
                             String osVersion)
                      throws ApiException
        \ This method is used to create an API.
        Parameters:
        apiRequest -
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API.
      • createNewAPIVersion

        public String createNewAPIVersion​(String newVersion,
                                          String apiId,
                                          boolean defaultVersion)
                                   throws ApiException
        This method is used to create a new API of the existing API.
        Parameters:
        newVersion - new API version
        apiId - old API ID
        defaultVersion - is this the
        Returns:
        apiID of the newly created api version.
        Throws:
        ApiException - Throws if an error occurs when creating the new API version.
      • deprecateAPI

        public void deprecateAPI​(String apiId)
                          throws ApiException
        This method is used to deprecate the created API.
        Parameters:
        apiId - API id that need to published.
        Throws:
        ApiException - throws if an error occurred when publishing the API.
      • deployPrototypeAPI

        public void deployPrototypeAPI​(String apiId)
                                throws ApiException
        This method is used to deploy the api as a prototype.
        Parameters:
        apiId - API id that need to be prototyped.
        Throws:
        ApiException - throws if an error occurred when publishing the API.
      • blockAPI

        public void blockAPI​(String apiId)
                      throws ApiException
        This method is used to block the created API.
        Parameters:
        apiId - API id that need to published.
        Throws:
        ApiException - throws if an error occurred when publishing the API.
      • getLifecycleStatus

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getLifecycleStatus​(String apiId)
                                                                                          throws ApiException
        Throws:
        ApiException
      • copyAPI

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse copyAPI​(String newVersion,
                                                                                      String apiId,
                                                                                      Boolean isDefault)
                                                                               throws ApiException
        copy API from existing API
        Parameters:
        newVersion - - new version of the API
        apiId - - existing API Id
        isDefault - - make the default version
        Returns:
        - http response object
        Throws:
        APIManagerIntegrationTestException - - Throws if error occurred at API copy operation
        ApiException
      • getAPI

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAPI​(String apiId)
                                                                              throws ApiException
        Method to get API information
        Parameters:
        apiId - - API id
        Returns:
        http response object
        Throws:
        ApiException - - Throws if api information cannot be retrieved.
      • deleteAPI

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteAPI​(String apiId)
                                                                                 throws ApiException
        delete API
        Parameters:
        apiId - - API id
        Returns:
        http response object
        Throws:
        ApiException - - Throws if API delete fails
      • generateMockScript

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse generateMockScript​(String apiId)
                                                                                          throws ApiException
        Throws:
        ApiException
      • getGenerateMockScript

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getGenerateMockScript​(String apiId)
                                                                                             throws ApiException
        Throws:
        ApiException
      • removeDocumentation

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeDocumentation​(String apiId,
                                                                                                  String docId)
                                                                                           throws ApiException
        Remove document
        Parameters:
        apiId - - API id
        docId - - document id
        Returns:
        http response object
        Throws:
        ApiException - - Throws if remove API document fails
      • revokeAccessToken

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse revokeAccessToken​(String accessToken,
                                                                                                String consumerKey,
                                                                                                String authUser)
                                                                                         throws APIManagerIntegrationTestException
        revoke access token
        Parameters:
        accessToken - - access token already received
        consumerKey - - consumer key returned
        authUser - - user name
        Returns:
        http response object
        Throws:
        APIManagerIntegrationTestException - - throws if access token revoke fails
      • updatePermissions

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updatePermissions​(String tierName,
                                                                                                String permissionType,
                                                                                                String roles)
                                                                                         throws APIManagerIntegrationTestException
        update permissions to API access
        Parameters:
        tierName - - name of api throttling tier
        permissionType - - permission type
        roles - - roles of permission
        Returns:
        http response object
        Throws:
        APIManagerIntegrationTestException - - throws if permission update fails
      • checkValidEndpoint

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse checkValidEndpoint​(String endpointUrl,
                                                                                                 String apiId)
                                                                                          throws ApiException
        Check whether the Endpoint is valid
        Parameters:
        endpointUrl - url of the endpoint
        apiId - id of the api which the endpoint to be validated
        Returns:
        HttpResponse - Response of the getAPI request
        Throws:
        ApiException - - Check for valid endpoint fails.
      • changeAPILifeCycleStatusToPublish

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse changeAPILifeCycleStatusToPublish​(String apiId,
                                                                                                                boolean isRequireReSubscription)
                                                                                                         throws ApiException
        Change the API Lifecycle status to Publish with the option of Re-subscription is required or not
        Parameters:
        apiId - - API ID
        isRequireReSubscription - - true if Re-subscription is required else false.
        Returns:
        HttpResponse - Response of the API publish event
        Throws:
        APIManagerIntegrationTestException - - Exception Throws in checkAuthentication() and when do the REST service calls to do the lifecycle change.
        ApiException
      • getTierPermissionsPage

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getTierPermissionsPage()
                                                                                              throws APIManagerIntegrationTestException
        Retrieve the Tier Permission Page
        Returns:
        HttpResponse - Response that contains the Tier Permission Page
        Throws:
        APIManagerIntegrationTestException - - Exception throws from checkAuthentication() method and HTTPSClientUtils.doGet() method call
      • addDocument

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addDocument​(String apiId,
                                                                                          DocumentDTO body)
                                                                                   throws ApiException
        Adding a documentation
        Parameters:
        apiId - - Id of the API.
        body - - document Body.
        Returns:
        HttpResponse - Response with Document adding result.
        Throws:
        ApiException - - Exception throws if error occurred when adding document.
      • addContentDocument

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addContentDocument​(String apiId,
                                                                                                 String docId,
                                                                                                 String docContent)
                                                                                          throws ApiException
        Adding a content to the document
        Parameters:
        apiId - - Id of the API.
        docId - - document Id.
        docContent - - document content
        Returns:
        HttpResponse - Response with Document adding result.
        Throws:
        ApiException - - Exception throws if error occurred when adding document.
      • updateContentDocument

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateContentDocument​(String apiId,
                                                                                                    String docId,
                                                                                                    File docContent)
                                                                                             throws ApiException
        Updating the document content using file
        Parameters:
        apiId - - Id of the API.
        docId - - document Id.
        docContent - - file content
        Returns:
        HttpResponse - Response with Document adding result.
        Throws:
        ApiException - - Exception throws if error occurred when adding document.
      • updateDocument

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateDocument​(String apiId,
                                                                                             String docId,
                                                                                             DocumentDTO documentDTO)
                                                                                      throws ApiException
        Update API document.
        Parameters:
        apiId - api Id
        docId - document Id
        documentDTO - documentation object.
        Returns:
        Throws:
        ApiException - Exception throws if error occurred when updating document.
      • getDocuments

        public DocumentListDTO getDocuments​(String apiId)
                                     throws ApiException
        This method is used to get documents Get Documents for the given limit and offset values
        Parameters:
        apiId - apiId
        Returns:
        Documents for the given limit and offset values
        Throws:
        ApiException
      • getDocumentContent

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getDocumentContent​(String apiId,
                                                                                                 String documentId)
                                                                                          throws ApiException
        This method is used to get the content of API documents
        Parameters:
        apiId - UUID of the API
        documentId - UUID of the API document
        Returns:
        Throws:
        ApiException
      • deleteDocument

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteDocument​(String apiId,
                                                                                             String documentId)
                                                                                      throws ApiException
        delete Document
        Parameters:
        apiId - - API id
        documentId - - API id
        Returns:
        http response object
        Throws:
        ApiException - - Throws if API delete fails
      • addSharedScope

        public ScopeDTO addSharedScope​(ScopeDTO scopeDTO)
                                throws ApiException
        Add a shared scope
        Parameters:
        scopeDTO -
        Returns:
        ScopeDTO - Returns the added shared scope
        Throws:
        ApiException
      • removeSharedScope

        public void removeSharedScope​(String id)
                               throws ApiException
        Remove a shared scope
        Parameters:
        id - id of the scope to delete
        Throws:
        ApiException
      • updateSharedScope

        public ScopeDTO updateSharedScope​(String uuid,
                                          ScopeDTO scopeDTO)
                                   throws ApiException
        Update a shared scopes
        Parameters:
        uuid -
        scopeDTO -
        Returns:
        ScopeDTO - Returns the updated shared scope
        Throws:
        ApiException
      • getSharedScopeById

        public ScopeDTO getSharedScopeById​(String uuid)
                                    throws ApiException
        Get a shared scope
        Parameters:
        uuid -
        Returns:
        ScopeDTO - Returns the updated shared scope
        Throws:
        ApiException
      • deleteSharedScope

        public void deleteSharedScope​(String uuid)
                               throws ApiException
        Delete a shared scope
        Parameters:
        uuid -
        Throws:
        ApiException
      • getAllSharedScopes

        public ScopeListDTO getAllSharedScopes()
                                        throws ApiException
        Get all shared scopes
        Returns:
        ScopeListDTO - Returns all the shared scopes
        Throws:
        ApiException
      • searchAPIs

        public SearchResultListDTO searchAPIs​(String query)
                                       throws ApiException
        Retrieve the APIs according to the search query in Publisher.
        Parameters:
        query - - The query on which the APIs needs to be filtered
        Returns:
        SearchResultListDTO - The search results of the query
        Throws:
        ApiException
      • getAPIs

        public APIListDTO getAPIs​(int offset,
                                  int limit)
                           throws ApiException
        This method is used to upload endpoint certificates Get APIs for the given limit and offset values
        Parameters:
        offset - starting position
        limit - maximum number of APIs to return
        Returns:
        APIs for the given limit and offset values
        Throws:
        ApiException
      • uploadEndpointCertificate

        public ApiResponse<CertMetadataDTO> uploadEndpointCertificate​(File certificate,
                                                                      String alias,
                                                                      String endpoint)
                                                               throws ApiException
        This method is used to upload certificates
        Parameters:
        certificate - certificate
        alias - alis
        endpoint - endpoint.
        Returns:
        Throws:
        ApiException - if an error occurred while uploading the certificate.
      • uploadCertificate

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse uploadCertificate​(File certificate,
                                                                                                String alias,
                                                                                                String apiId,
                                                                                                String tier)
                                                                                         throws ApiException
        This method is used to upload certificates
        Parameters:
        certificate - certificate
        alias - alis
        Returns:
        Throws:
        ApiException - if an error occurred while uploading the certificate.
      • updateAPIWithHttpInfo

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateAPIWithHttpInfo​(APIDTO apidto)
        Update an API
        Parameters:
        apidto -
        Returns:
        Throws:
        ApiException
      • getAuditApi

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAuditApi​(String apiId)
                                                                                   throws ApiException
        Method to retrieve the Audit Report of an API
        Parameters:
        apiId - apiId of the API
        Returns:
        HttpResponse response
        Throws:
        ApiException
      • getGraphQLSchemaTypeListResponse

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getGraphQLSchemaTypeListResponse​(String apiId)
                                                                                                        throws ApiException
        Method to retrieve the GraphQL Schema Type List
        Parameters:
        apiId - apiId of the API
        Returns:
        HttpResponse response
        Throws:
        ApiException
      • getGraphQLSchemaTypeList

        public GraphQLSchemaTypeListDTO getGraphQLSchemaTypeList​(String apiId)
                                                          throws ApiException
        Method to retrieve the GraphQL Schema Type List
        Parameters:
        apiId - apiId of the API
        Returns:
        GraphQLSchemaTypeListDTO GraphQLSchemaTypeList object
        Throws:
        ApiException
      • addGraphQLComplexityDetails

        public void addGraphQLComplexityDetails​(GraphQLQueryComplexityInfoDTO graphQLQueryComplexityInfoDTO,
                                                String apiID)
                                         throws ApiException
        Method to add GraphQL Complexity Info of an API
        Parameters:
        apiID -
        graphQLQueryComplexityInfoDTO - GraphQL Complexity Object
        Throws:
        ApiException
      • getGraphQLComplexityResponse

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getGraphQLComplexityResponse​(String apiId)
                                                                                                    throws ApiException
        Method to retrieve the GraphQL Complexity Details
        Parameters:
        apiId - apiId of the API
        Returns:
        HttpResponse response
        Throws:
        ApiException
      • addAPIRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addAPIRevision​(APIRevisionRequest apiRevisionRequest)
                                                                                      throws ApiException
        This method is used to create an API Revision.
        Parameters:
        apiRevisionRequest - API Revision create object body
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • addAPIRevision

        public APIRevisionDTO addAPIRevision​(String apiId)
                                      throws ApiException
        This method is used to create an API Revision.
        Parameters:
        apiId - API Revision create object body
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • getAPIRevisions

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAPIRevisions​(String apiUUID,
                                                                                              String query)
                                                                                       throws ApiException
        Method to get API Revisions per API
        Parameters:
        apiUUID - - API uuid
        query - - Search query
        Returns:
        http response object
        Throws:
        ApiException - - Throws if api information cannot be retrieved.
      • restoreAPIRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse restoreAPIRevision​(String apiUUID,
                                                                                                 String revisionUUID)
                                                                                          throws ApiException
        This method is used to restore an API Revision.
        Parameters:
        apiUUID - API UUID
        revisionUUID - API Revision UUID
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • deleteAPIRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteAPIRevision​(String apiUUID,
                                                                                                String revisionUUID)
                                                                                         throws ApiException
        This method is used to delete an API Revision.
        Parameters:
        apiUUID - API UUID
        revisionUUID - API Revision UUID
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • addAPIProductRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addAPIProductRevision​(APIRevisionRequest apiRevisionRequest)
                                                                                             throws ApiException
        This method is used to create an API Product Revision.
        Parameters:
        apiRevisionRequest - API Revision create object body
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • getAPIProductRevisions

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAPIProductRevisions​(String apiUUID,
                                                                                                     String query)
                                                                                              throws ApiException
        Method to get API Product Revisions per API
        Parameters:
        apiUUID - - API uuid
        query - - Search query
        Returns:
        http response object
        Throws:
        ApiException - - Throws if api information cannot be retrieved.
      • restoreAPIProductRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse restoreAPIProductRevision​(String apiUUID,
                                                                                                        String revisionUUID)
                                                                                                 throws ApiException
        This method is used to restore an API Product Revision.
        Parameters:
        apiUUID - API UUID
        revisionUUID - API Revision UUID
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • deleteAPIProductRevision

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteAPIProductRevision​(String apiUUID,
                                                                                                       String revisionUUID)
                                                                                                throws ApiException
        This method is used to delete an API product Revision.
        Parameters:
        apiUUID - API UUID
        revisionUUID - API Revision UUID
        Returns:
        HttpResponse
        Throws:
        ApiException - throws of an error occurred when creating the API Revision.
      • addComment

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addComment​(String apiId,
                                                                                         String comment,
                                                                                         String category,
                                                                                         String replyTo)
                                                                                  throws ApiException
        Add comment to given API
        Parameters:
        apiId - - api Id
        comment - - comment to add
        category - - category of the comment
        replyTo - - comment id of the root comment to add replies
        Returns:
        - http response of add comment
        Throws:
        ApiException - - throws if add comment fails
      • getComment

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getComment​(String commentId,
                                                                                         String apiId,
                                                                                         String tenantDomain,
                                                                                         boolean includeCommentorInfo,
                                                                                         Integer limit,
                                                                                         Integer offset)
                                                                                  throws ApiException
        Get Comment from given API
        Parameters:
        commentId - - comment Id
        apiId - - api Id
        tenantDomain - - tenant domain
        limit - - for pagination
        offset - - for pagination
        Returns:
        - http response get comment
        Throws:
        ApiException - - throws if get comment fails
      • getComments

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getComments​(String apiId,
                                                                                          String tenantDomain,
                                                                                          boolean includeCommentorInfo,
                                                                                          Integer limit,
                                                                                          Integer offset)
                                                                                   throws ApiException
        Get all the comments from given API
        Parameters:
        apiId - - api Id
        tenantDomain - - tenant domain
        limit - - for pagination
        offset - - for pagination
        Returns:
        - http response get comment
        Throws:
        ApiException - - throws if get comment fails
      • getReplies

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getReplies​(String commentId,
                                                                                         String apiId,
                                                                                         String tenantDomain,
                                                                                         boolean includeCommentorInfo,
                                                                                         Integer limit,
                                                                                         Integer offset)
                                                                                  throws ApiException
        Get replies of a comment from given API
        Parameters:
        commentId - - comment Id
        apiId - - api Id
        tenantDomain - - tenant domain
        limit - - for pagination
        offset - - for pagination
        Returns:
        - http response get comment
        Throws:
        ApiException - - throws if get comment fails
      • editComment

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse editComment​(String commentId,
                                                                                          String apiId,
                                                                                          String comment,
                                                                                          String category)
                                                                                   throws ApiException
        Get Comment from given API
        Parameters:
        commentId - - comment Id
        apiId - - api Id
        comment - - comment to add
        category - - category of the comment
        Returns:
        - http response get comment
        Throws:
        ApiException - - throws if get comment fails
      • removeComment

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeComment​(String commentId,
                                                                                            String apiId)
                                                                                     throws ApiException
        Remove comment in given API
        Parameters:
        commentId - - comment Id
        apiId - - api Id
        Throws:
        ApiException - - throws if remove comment fails
      • getLifecycleStatusOfApiProduct

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getLifecycleStatusOfApiProduct​(String apiProductId)
                                                                                                      throws ApiException
        Get lifecycle state information of an API Product
        Parameters:
        apiProductId - UUID of API Product
        Returns:
        Http Response object
        Throws:
        ApiException - If error when retrieving the lifecycle state information of an api product
      • getLifecycleHistoryOfApiProduct

        public LifecycleHistoryDTO getLifecycleHistoryOfApiProduct​(String apiProductId)
                                                            throws ApiException
        Get lifecycle state change history of an API Product
        Parameters:
        apiProductId - UUID of API Product
        Returns:
        LifecycleHistoryDTO object
        Throws:
        ApiException - If error when retrieving the lifecycle state change history of API Product
      • getAllCommonOperationPolicies

        public Map<String,​String> getAllCommonOperationPolicies()
                                                               throws ApiException
        Method to get all common operation policies
        Returns:
        A map of policy name and policy UUID
        Throws:
        ApiException - - Throws if policy information cannot be retrieved.
      • getAllAPISpecificOperationPolicies

        public Map<String,​String> getAllAPISpecificOperationPolicies​(String apiId)
                                                                    throws ApiException
        Method to get all API specific operation policies
        Parameters:
        apiId - - API uuid
        Returns:
        A map of policy name and policy UUID
        Throws:
        ApiException - - Throws if policy information cannot be retrieved.
      • getCommonOperationPolicy

        public OperationPolicyDataDTO getCommonOperationPolicy​(String policyId)
                                                        throws ApiException
        Method to get Common operation policy by PolicyID
        Parameters:
        policyId - - PolicyUUID
        Returns:
        OperationPolicyDataDTO
        Throws:
        ApiException - - Throws if policy information cannot be retrieved.
      • getAPISpecificOperationPolicy

        public OperationPolicyDataDTO getAPISpecificOperationPolicy​(String policyId,
                                                                    String apiId)
                                                             throws ApiException
        Method to get API specific operation policy by policyId
        Parameters:
        policyId - - PolicyUUID
        Returns:
        OperationPolicyDataDTO
        Throws:
        ApiException - - Throws if policy information cannot be retrieved.
      • addCommonOperationPolicy

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addCommonOperationPolicy​(File policySpecFile,
                                                                                                       File synapsePolicyDefinitionFile,
                                                                                                       File ccPolicyDefinitionFile)
                                                                                                throws ApiException
        Add common operation policy
        Parameters:
        policySpecFile - - Policy specification file
        synapsePolicyDefinitionFile - - Synapse policy definition
        ccPolicyDefinitionFile - - Choreo connect policy definition
        Returns:
        - http response of add common policy
        Throws:
        ApiException - - throws if add common policy fails
      • addAPISpecificOperationPolicy

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addAPISpecificOperationPolicy​(String apiId,
                                                                                                            File policySpecFile,
                                                                                                            File synapsePolicyDefinitionFile,
                                                                                                            File ccPolicyDefinitionFile)
                                                                                                     throws ApiException
        Add an API specific operation policy
        Parameters:
        apiId - - UUID of the API
        policySpecFile - - Policy specification file
        synapsePolicyDefinitionFile - - Synapse policy definition
        ccPolicyDefinitionFile - - Choreo connect policy definition
        Returns:
        - http response of add common policy
        Throws:
        ApiException - - throws if add common policy fails
      • deleteCommonOperationPolicy

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteCommonOperationPolicy​(String policyId)
                                                                                                   throws ApiException
        Delete common operation policy
        Parameters:
        policyId - - Policy Id
        Throws:
        ApiException - - throws if remove comment fails
      • deleteAPISpecificPolicy

        public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteAPISpecificPolicy​(String policyId,
                                                                                                      String apiId)
                                                                                               throws ApiException
        Delete API specific policy in given API
        Parameters:
        policyId - - policy Id
        apiId - - api Id
        Throws:
        ApiException - - throws if remove comment fails
      • getCertificateUsage

        public ApiResponse<APIMetadataListDTO> getCertificateUsage​(String alias,
                                                                   Integer limit,
                                                                   Integer offset)
                                                            throws ApiException
        Get the Certificate usage.
        Parameters:
        alias - Alias of the certificate
        limit - Number of results needed
        offset - Offset
        Returns:
        ApiResponse object
        Throws:
        ApiException - If error when fetching certificate usage
      • getLinterCustomRules

        public String getLinterCustomRules()
                                    throws ApiException
        Retrieve linter custom rules
        Returns:
        - linter custom rules JSONObject
        Throws:
        ApiException - - throws if get linter custom rules fails