Class RestAPIPublisherImpl
- java.lang.Object
-
- org.wso2.am.integration.test.impl.RestAPIPublisherImpl
-
public class RestAPIPublisherImpl extends Object
This util class performs the actions related to APIDTOobjects.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description RestAPIPublisherImpl()Deprecated.RestAPIPublisherImpl(String username, String password, String tenantDomain, String publisherURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description APIDTOaddAPI(APIDTO apidto, String osVersion)APIDTOaddAPI(APICreationRequestBean apiCreationRequestBean)org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPI(APIRequest apiRequest)\ This method is used to create an API.APIDTOaddAPI(APIRequest apiRequest, String osVersion)\ This method is used to create an API.APIProductDTOaddApiProduct(APIProductDTO apiProductDTO)org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPIProductRevision(APIRevisionRequest apiRevisionRequest)This method is used to create an API Product Revision.APIRevisionDTOaddAPIRevision(String apiId)This method is used to create an API Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPIRevision(APIRevisionRequest apiRevisionRequest)This method is used to create an API Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPISpecificOperationPolicy(String apiId, File policySpecFile, File synapsePolicyDefinitionFile, File ccPolicyDefinitionFile)Add an API specific operation policyorg.wso2.carbon.automation.test.utils.http.client.HttpResponseaddComment(String apiId, String comment, String category, String replyTo)Add comment to given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseaddCommonOperationPolicy(File policySpecFile, File synapsePolicyDefinitionFile, File ccPolicyDefinitionFile)Add common operation policyorg.wso2.carbon.automation.test.utils.http.client.HttpResponseaddContentDocument(String apiId, String docId, String docContent)Adding a content to the documentorg.wso2.carbon.automation.test.utils.http.client.HttpResponseaddDocument(String apiId, DocumentDTO body)Adding a documentationvoidaddGraphQLComplexityDetails(GraphQLQueryComplexityInfoDTO graphQLQueryComplexityInfoDTO, String apiID)Method to add GraphQL Complexity Info of an APIScopeDTOaddSharedScope(ScopeDTO scopeDTO)Add a shared scopevoidblockAPI(String apiId)This method is used to block the created API.WorkflowResponseDTOchangeAPILifeCycleStatus(String apiId, String action)org.wso2.carbon.automation.test.utils.http.client.HttpResponsechangeAPILifeCycleStatus(String apiId, String action, String lifecycleChecklist)This method is used to publish the created API.org.wso2.carbon.automation.test.utils.http.client.HttpResponsechangeAPILifeCycleStatusToPublish(String apiId, boolean isRequireReSubscription)Change the API Lifecycle status to Publish with the option of Re-subscription is required or notWorkflowResponseDTOchangeAPIProductLifeCycleStatus(String apiProductId, String action, String lifecycleChecklist)Change the lifecycle status of API Productorg.wso2.carbon.automation.test.utils.http.client.HttpResponsecheckValidEndpoint(String endpointUrl, String apiId)Check whether the Endpoint is validorg.wso2.carbon.automation.test.utils.http.client.HttpResponsecopyAPI(String newVersion, String apiId, Boolean isDefault)copy API from existing APIAPIDTOcopyAPIWithReturnDTO(String newVersion, String apiId, Boolean isDefault)StringcreateNewAPIVersion(String newVersion, String apiId, boolean defaultVersion)This method is used to create a new API of the existing API.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteAPI(String apiId)delete APIvoiddeleteApiProduct(String apiProductId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteAPIProductRevision(String apiUUID, String revisionUUID)This method is used to delete an API product Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteAPIRevision(String apiUUID, String revisionUUID)This method is used to delete an API Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteAPISpecificPolicy(String policyId, String apiId)Delete API specific policy in given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteCommonOperationPolicy(String policyId)Delete common operation policyorg.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteDocument(String apiId, String documentId)delete DocumentApiResponse<Void>deleteEndpointCertificate(String alias)voiddeleteSharedScope(String uuid)Delete a shared scopeorg.wso2.carbon.automation.test.utils.http.client.HttpResponsedeployAPIProductRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionDeployRequestList, String apiType)This method is used to deploy API Product Revision to Gateways.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeployAPIRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionDeployRequestList, String apiType)This method is used to deploy API Revision to Gateways.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeployAPIRevision(String apiUUID, String revisionUUID, APIRevisionDeployUndeployRequest apiRevisionDeployRequest, String apiType)This method is used to deploy API Revision to Gateways.voiddeployPrototypeAPI(String apiId)This method is used to deploy the api as a prototype.voiddeprecateAPI(String apiId)This method is used to deprecate the created API.org.wso2.carbon.automation.test.utils.http.client.HttpResponseeditComment(String commentId, String apiId, String comment, String category)Get Comment from given APIApiResponse<APIKeyDTO>generateInternalApiKey(String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegenerateMockScript(String apiId)StringgetAccessToken()APIProductListDTOgetAllApiProducts()APIListDTOgetAllAPIs()Retrieve the All APIs available for the user in Publisher.Map<String,String>getAllAPISpecificOperationPolicies(String apiId)Method to get all API specific operation policiesMap<String,String>getAllCommonOperationPolicies()Method to get all common operation policiesMap<String,String>getAllCommonOperationPolicies(int limit)ScopeListDTOgetAllSharedScopes()Get all shared scopesorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAPI(String apiId)Method to get API informationAPIDTOgetAPIByID(String apiId)APIDTOgetAPIByID(String apiId, String tenantDomain)APIProductDTOgetApiProduct(String apiProductId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAPIProductRevisions(String apiUUID, String query)Method to get API Product Revisions per APIResourcePolicyListDTOgetApiResourcePolicies(String apiId, String sequenceType, String resourcePath, String verb)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAPIRevisions(String apiUUID, String query)Method to get API Revisions per APIAPIListDTOgetAPIs(int offset, int limit)This method is used to upload endpoint certificates Get APIs for the given limit and offset valuesOperationPolicyDataDTOgetAPISpecificOperationPolicy(String policyId, String apiId)Method to get API specific operation policy by policyIdApiResponse<Void>getAsyncAPIDefinitionOfAPI(String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAuditApi(String apiId)Method to retrieve the Audit Report of an APIApiResponse<APIMetadataListDTO>getCertificateUsage(String alias, Integer limit, Integer offset)Get the Certificate usage.org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetComment(String commentId, String apiId, String tenantDomain, boolean includeCommentorInfo, Integer limit, Integer offset)Get Comment from given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetComments(String apiId, String tenantDomain, boolean includeCommentorInfo, Integer limit, Integer offset)Get all the comments from given APIOperationPolicyDataDTOgetCommonOperationPolicy(String policyId)Method to get Common operation policy by PolicyIDorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetDocumentContent(String apiId, String documentId)This method is used to get the content of API documentsDocumentListDTOgetDocuments(String apiId)This method is used to get documents Get Documents for the given limit and offset valuesCertificateInfoDTOgetendpointCertificateContent(String alias)CertificatesDTOgetEndpointCertificiates(String endpoint, String alias)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetGenerateMockScript(String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetGraphQLComplexityResponse(String apiId)Method to retrieve the GraphQL Complexity DetailsGraphQLSchemaDTOgetGraphqlSchemaDefinition(String apiId)GraphQLSchemaTypeListDTOgetGraphQLSchemaTypeList(String apiId)Method to retrieve the GraphQL Schema Type Listorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetGraphQLSchemaTypeListResponse(String apiId)Method to retrieve the GraphQL Schema Type ListLifecycleHistoryDTOgetLifecycleHistory(String apiId)LifecycleHistoryDTOgetLifecycleHistoryOfApiProduct(String apiProductId)Get lifecycle state change history of an API Productorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetLifecycleStatus(String apiId)LifecycleStateDTOgetLifecycleStatusDTO(String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetLifecycleStatusOfApiProduct(String apiProductId)Get lifecycle state information of an API ProductStringgetLinterCustomRules()Retrieve linter custom rulesorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetReplies(String commentId, String apiId, String tenantDomain, boolean includeCommentorInfo, Integer limit, Integer offset)Get replies of a comment from given APISettingsDTOgetSettings()ScopeDTOgetSharedScopeById(String uuid)Get a shared scopeSubscriptionListDTOgetSubscriptionByAPIID(String apiID)Get subscription of an APISubscriptionPolicyListDTOgetSubscriptionPolicies(String tierQuotaTypes)StringgetSwaggerByID(String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetTierPermissionsPage()Retrieve the Tier Permission PageThrottlingPolicyListDTOgetTiers(String policyLevel)This method is used to get all throttling tiers.ApiResponse<Void>getWSDLSchemaDefinitionOfAPI(String apiId)ApiResponse<APIDTO>importAsyncAPIDefinition(File file, String properties)APIDTOimportAsyncAPISchemaDefinition(File file, String url, String properties)APIDTOimportGraphqlSchemaDefinition(File file, String properties)APIDTOimportOASDefinition(File file, String properties)ApiResponse<APIDTO>importOASDefinitionResponse(File file, String properties)ApiResponse<Void>importOperationPolicy(File file)Import Operation Policy.APIDTOimportWSDLSchemaDefinition(File file, String url, String properties, String type)Map<String,String>mapPolicyNameToId(OperationPolicyDataListDTO policyList)org.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveComment(String commentId, String apiId)Remove comment in given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveDocumentation(String apiId, String docId)Remove documentvoidremoveSharedScope(String id)Remove a shared scopeorg.wso2.carbon.automation.test.utils.http.client.HttpResponserestoreAPIProductRevision(String apiUUID, String revisionUUID)This method is used to restore an API Product Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponserestoreAPIRevision(String apiUUID, String revisionUUID)This method is used to restore an API Revision.org.wso2.carbon.automation.test.utils.http.client.HttpResponserevokeAccessToken(String accessToken, String consumerKey, String authUser)revoke access tokenSearchResultListDTOsearchAPIs(String query)Retrieve the APIs according to the search query in Publisher.voidsetAccessToken(String accessToken)org.wso2.carbon.automation.test.utils.http.client.HttpResponseundeployAPIProductRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionUndeployRequestList)This method is used to undeploy API Product Revision to Gateways.org.wso2.carbon.automation.test.utils.http.client.HttpResponseundeployAPIRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionUndeployRequestList)This method is used to undeploy API Revision to Gateways.APIDTOupdateAPI(APIDTO apidto)Update an APIAPIDTOupdateAPI(APIDTO apidto, String apiId)org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateAPI(APIRequest apiRequest, String apiId)Facilitate update APIApiResponse<APIProductDTO>updateAPIProduct(APIProductDTO apiProductDTO)ResourcePolicyInfoDTOupdateApiResourcePolicies(String apiId, String resourcePolicyId, String resourcePath, ResourcePolicyInfoDTO resourcePolicyInfoDTO, String verb)org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateAPIWithHttpInfo(APIDTO apidto)Update an APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateContentDocument(String apiId, String docId, File docContent)Updating the document content using fileorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateDocument(String apiId, String docId, DocumentDTO documentDTO)Update API document.voidupdateGraphqlSchemaDefinition(String apiId, String schemaDefinition)org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdatePermissions(String tierName, String permissionType, String roles)update permissions to API accessorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateResourceOfAPI(String apiId, String api)Update resources of APIScopeDTOupdateSharedScope(String uuid, ScopeDTO scopeDTO)Update a shared scopesStringupdateSwagger(String apiId, String definition)org.wso2.carbon.automation.test.utils.http.client.HttpResponseuploadCertificate(File certificate, String alias, String apiId, String tier)This method is used to upload certificatesApiResponse<CertMetadataDTO>uploadEndpointCertificate(File certificate, String alias, String endpoint)This method is used to upload certificatesAsyncAPISpecificationValidationResponseDTOvalidateAsyncAPISchemaDefinition(String url, File file)GraphQLValidationResponseDTOvalidateGraphqlSchemaDefinition(File schemaDefinition)OpenAPIDefinitionValidationResponseDTOvalidateOASDefinition(File oasDefinition)ApiResponse<Void>validateRoles(String roleId)This method is used to validate roles.WSDLValidationResponseDTOvalidateWsdlDefinition(String url, File wsdlDefinition)
-
-
-
Field Detail
-
appName
public static final String appName
- See Also:
- Constant Field Values
-
callBackURL
public static final String callBackURL
- See Also:
- Constant Field Values
-
tokenScope
public static final String tokenScope
- See Also:
- Constant Field Values
-
appOwner
public static final String appOwner
- See Also:
- Constant Field Values
-
grantType
public static final String grantType
- See Also:
- Constant Field Values
-
username
public static final String username
- See Also:
- Constant Field Values
-
password
public static final String password
- See Also:
- Constant Field Values
-
testNameProperty
public static final String testNameProperty
- See Also:
- Constant Field Values
-
apIsApi
public ApIsApi apIsApi
-
apiDocumentsApi
public ApiDocumentsApi apiDocumentsApi
-
apiRevisionsApi
public ApiRevisionsApi apiRevisionsApi
-
apiResourcePoliciesApi
public ApiResourcePoliciesApi apiResourcePoliciesApi
-
apiProductRevisionsApi
public ApiProductRevisionsApi apiProductRevisionsApi
-
throttlingPoliciesApi
public ThrottlingPoliciesApi throttlingPoliciesApi
-
clientCertificatesApi
public ClientCertificatesApi clientCertificatesApi
-
endpointCertificatesApi
public EndpointCertificatesApi endpointCertificatesApi
-
graphQlSchemaApi
public GraphQlSchemaApi graphQlSchemaApi
-
graphQlSchemaIndividualApi
public GraphQlSchemaIndividualApi graphQlSchemaIndividualApi
-
apiLifecycleApi
public ApiLifecycleApi apiLifecycleApi
-
commentsApi
public CommentsApi commentsApi
-
rolesApi
public RolesApi rolesApi
-
validationApi
public ValidationApi validationApi
-
subscriptionsApi
public SubscriptionsApi subscriptionsApi
-
apiAuditApi
public ApiAuditApi apiAuditApi
-
graphQlPoliciesApi
public GraphQlPoliciesApi graphQlPoliciesApi
-
unifiedSearchApi
public UnifiedSearchApi unifiedSearchApi
-
sharedScopesApi
public ScopesApi sharedScopesApi
-
productLifecycleApi
public ApiProductLifecycleApi productLifecycleApi
-
apiPublisherClient
public ApiClient apiPublisherClient
-
tenantDomain
public String tenantDomain
-
accessToken
public String accessToken
-
settingsApi
public SettingsApi settingsApi
-
-
Constructor Detail
-
RestAPIPublisherImpl
@Deprecated public RestAPIPublisherImpl()
Deprecated.
-
-
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.
-
addAPI
public APIDTO addAPI(APIDTO apidto, String osVersion) throws ApiException
- Throws:
ApiException
-
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 versionapiId- old API IDdefaultVersion- is this the- Returns:
- apiID of the newly created api version.
- Throws:
ApiException- Throws if an error occurs when creating the new API version.
-
changeAPILifeCycleStatus
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse changeAPILifeCycleStatus(String apiId, String action, String lifecycleChecklist) throws ApiException, APIManagerIntegrationTestException
This method is used to publish the created API.- Parameters:
action- API id that need to published.apiId- API id that need to published. return ApiResponsechange response. - Throws:
ApiException- throws if an error occurred when publishing the API.APIManagerIntegrationTestException
-
changeAPILifeCycleStatus
public WorkflowResponseDTO changeAPILifeCycleStatus(String apiId, String action) throws ApiException, APIManagerIntegrationTestException
-
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
-
getLifecycleStatusDTO
public LifecycleStateDTO getLifecycleStatusDTO(String apiId) throws ApiException
- Throws:
ApiException
-
getLifecycleHistory
public LifecycleHistoryDTO getLifecycleHistory(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 APIapiId- - existing API IdisDefault- - make the default version- Returns:
- - http response object
- Throws:
APIManagerIntegrationTestException- - Throws if error occurred at API copy operationApiException
-
copyAPIWithReturnDTO
public APIDTO copyAPIWithReturnDTO(String newVersion, String apiId, Boolean isDefault) throws ApiException
- Parameters:
newVersion-apiId-isDefault-- Returns:
- Throws:
ApiException
-
updateAPI
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateAPI(APIRequest apiRequest, String apiId) throws ApiException
Facilitate update API- Parameters:
apiRequest- - constructed API request object- Returns:
- http response object
- Throws:
APIManagerIntegrationTestException- - throws if update API failsApiException
-
updateAPI
public APIDTO updateAPI(APIDTO apidto, String apiId) throws ApiException
- Throws:
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 iddocId- - 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 receivedconsumerKey- - consumer key returnedauthUser- - 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 tierpermissionType- - permission typeroles- - roles of permission- Returns:
- http response object
- Throws:
APIManagerIntegrationTestException- - throws if permission update fails
-
updateResourceOfAPI
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateResourceOfAPI(String apiId, String api) throws APIManagerIntegrationTestException
Update resources of API- Parameters:
apiId- - API Id- Returns:
- http response object
- Throws:
APIManagerIntegrationTestException- - throws if API resource 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 endpointapiId- 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 IDisRequireReSubscription- - 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 APIManagerIntegrationTestExceptionRetrieve 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 IddocId- document IddocumentDTO- 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 APIdocumentId- 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 iddocumentId- - 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
-
getAllAPIs
public APIListDTO getAllAPIs() throws APIManagerIntegrationTestException, ApiException
Retrieve the All APIs available for the user in Publisher.- Returns:
- HttpResponse - Response that contains all available APIs for the user
- Throws:
APIManagerIntegrationTestException- - Exception throws from checkAuthentication() method and HTTPSClientUtils.doGet() method callApiException
-
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 positionlimit- 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- certificatealias- alisendpoint- endpoint.- Returns:
- Throws:
ApiException- if an error occurred while uploading the certificate.
-
getTiers
public ThrottlingPolicyListDTO getTiers(String policyLevel) throws ApiException
This method is used to get all throttling tiers.- Returns:
- - Response that contains all the available tiers
- Throws:
ApiException
-
getSubscriptionPolicies
public SubscriptionPolicyListDTO getSubscriptionPolicies(String tierQuotaTypes) throws ApiException
- Throws:
ApiException
-
validateRoles
public ApiResponse<Void> validateRoles(String roleId) throws ApiException
This method is used to validate roles.- Parameters:
roleId- role Id- Returns:
- HttpResponse
- Throws:
APIManagerIntegrationTestExceptionApiException
-
getSwaggerByID
public String getSwaggerByID(String apiId) throws ApiException
- Throws:
ApiException
-
updateSwagger
public String updateSwagger(String apiId, String definition) throws ApiException
- Throws:
ApiException
-
validateOASDefinition
public OpenAPIDefinitionValidationResponseDTO validateOASDefinition(File oasDefinition) throws ApiException
- Throws:
ApiException
-
getAPIByID
public APIDTO getAPIByID(String apiId, String tenantDomain) throws ApiException
- Throws:
ApiException
-
getAPIByID
public APIDTO getAPIByID(String apiId) throws ApiException
- Throws:
ApiException
-
importOASDefinition
public APIDTO importOASDefinition(File file, String properties) throws ApiException
- Throws:
ApiException
-
importOASDefinitionResponse
public ApiResponse<APIDTO> importOASDefinitionResponse(File file, String properties) throws ApiException
- Throws:
ApiException
-
validateGraphqlSchemaDefinition
public GraphQLValidationResponseDTO validateGraphqlSchemaDefinition(File schemaDefinition) throws ApiException
- Throws:
ApiException
-
importGraphqlSchemaDefinition
public APIDTO importGraphqlSchemaDefinition(File file, String properties) throws ApiException
- Throws:
ApiException
-
getGraphqlSchemaDefinition
public GraphQLSchemaDTO getGraphqlSchemaDefinition(String apiId) throws ApiException
- Throws:
ApiException
-
updateGraphqlSchemaDefinition
public void updateGraphqlSchemaDefinition(String apiId, String schemaDefinition) throws ApiException
- Throws:
ApiException
-
validateWsdlDefinition
public WSDLValidationResponseDTO validateWsdlDefinition(String url, File wsdlDefinition) throws ApiException
- Throws:
ApiException
-
importWSDLSchemaDefinition
public APIDTO importWSDLSchemaDefinition(File file, String url, String properties, String type) throws ApiException
- Throws:
ApiException
-
getWSDLSchemaDefinitionOfAPI
public ApiResponse<Void> getWSDLSchemaDefinitionOfAPI(String apiId) throws ApiException
- Throws:
ApiException
-
importAsyncAPIDefinition
public ApiResponse<APIDTO> importAsyncAPIDefinition(File file, String properties) throws ApiException
- Throws:
ApiException
-
getApiResourcePolicies
public ResourcePolicyListDTO getApiResourcePolicies(String apiId, String sequenceType, String resourcePath, String verb) throws ApiException
- Throws:
ApiException
-
updateApiResourcePolicies
public ResourcePolicyInfoDTO updateApiResourcePolicies(String apiId, String resourcePolicyId, String resourcePath, ResourcePolicyInfoDTO resourcePolicyInfoDTO, String verb) throws ApiException
- Throws:
ApiException
-
validateAsyncAPISchemaDefinition
public AsyncAPISpecificationValidationResponseDTO validateAsyncAPISchemaDefinition(String url, File file) throws ApiException
- Throws:
ApiException
-
importAsyncAPISchemaDefinition
public APIDTO importAsyncAPISchemaDefinition(File file, String url, String properties) throws ApiException
- Throws:
ApiException
-
getAsyncAPIDefinitionOfAPI
public ApiResponse<Void> getAsyncAPIDefinitionOfAPI(String apiId) throws ApiException
- Throws:
ApiException
-
addAPI
public APIDTO addAPI(APICreationRequestBean apiCreationRequestBean) throws ApiException
- Throws:
ApiException
-
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- certificatealias- alis- Returns:
- Throws:
ApiException- if an error occurred while uploading the certificate.
-
updateAPI
public APIDTO updateAPI(APIDTO apidto) throws ApiException
Update an API- Parameters:
apidto-- Returns:
- Throws:
ApiException
-
updateAPIWithHttpInfo
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateAPIWithHttpInfo(APIDTO apidto)
Update an API- Parameters:
apidto-- Returns:
- Throws:
ApiException
-
getSubscriptionByAPIID
public SubscriptionListDTO getSubscriptionByAPIID(String apiID) throws ApiException
Get subscription of an API- Parameters:
apiID-- Returns:
- Throws:
ApiException
-
getAllApiProducts
public APIProductListDTO getAllApiProducts() throws ApiException
- Throws:
ApiException
-
getApiProduct
public APIProductDTO getApiProduct(String apiProductId) throws ApiException
- Throws:
ApiException
-
addApiProduct
public APIProductDTO addApiProduct(APIProductDTO apiProductDTO) throws ApiException
- Throws:
ApiException
-
deleteApiProduct
public void deleteApiProduct(String apiProductId) throws ApiException
- 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 uuidquery- - Search query- Returns:
- http response object
- Throws:
ApiException- - Throws if api information cannot be retrieved.
-
deployAPIRevision
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deployAPIRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionDeployRequestList, String apiType) throws ApiException, APIManagerIntegrationTestException
This method is used to deploy API Revision to Gateways.- Parameters:
apiRevisionDeployRequestList- API Revision deploy object body- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when creating the API Revision.APIManagerIntegrationTestException
-
deployAPIRevision
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deployAPIRevision(String apiUUID, String revisionUUID, APIRevisionDeployUndeployRequest apiRevisionDeployRequest, String apiType) throws ApiException, APIManagerIntegrationTestException
This method is used to deploy API Revision to Gateways.- Parameters:
apiUUID- UUID of APIrevisionUUID- UUID of API RevisionapiRevisionDeployRequest- API Revision deploy object bodyapiType- API Type- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when creating the API Revision.APIManagerIntegrationTestException
-
undeployAPIRevision
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse undeployAPIRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionUndeployRequestList) throws ApiException, APIManagerIntegrationTestException
This method is used to undeploy API Revision to Gateways.- Parameters:
apiUUID- API UUIDrevisionUUID- API Revision UUIDapiRevisionUndeployRequestList- API Revision undeploy object body- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when undeploying the API Revision.APIManagerIntegrationTestException
-
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 UUIDrevisionUUID- 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 UUIDrevisionUUID- 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 uuidquery- - Search query- Returns:
- http response object
- Throws:
ApiException- - Throws if api information cannot be retrieved.
-
deployAPIProductRevision
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deployAPIProductRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionDeployRequestList, String apiType) throws ApiException, APIManagerIntegrationTestException
This method is used to deploy API Product Revision to Gateways.- Parameters:
apiRevisionDeployRequestList- API Revision deploy object body- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when creating the API Revision.APIManagerIntegrationTestException
-
undeployAPIProductRevision
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse undeployAPIProductRevision(String apiUUID, String revisionUUID, List<APIRevisionDeployUndeployRequest> apiRevisionUndeployRequestList) throws ApiException, APIManagerIntegrationTestException
This method is used to undeploy API Product Revision to Gateways.- Parameters:
apiUUID- API UUIDrevisionUUID- API Revision UUIDapiRevisionUndeployRequestList- API Revision undeploy object body- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when undeploying the API Revision.APIManagerIntegrationTestException
-
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 UUIDrevisionUUID- 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 UUIDrevisionUUID- API Revision UUID- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when creating the API Revision.
-
generateInternalApiKey
public ApiResponse<APIKeyDTO> generateInternalApiKey(String apiId) throws ApiException
- Throws:
ApiException
-
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 Idcomment- - comment to addcategory- - category of the commentreplyTo- - 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 IdapiId- - api IdtenantDomain- - tenant domainlimit- - for paginationoffset- - 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 IdtenantDomain- - tenant domainlimit- - for paginationoffset- - 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 IdapiId- - api IdtenantDomain- - tenant domainlimit- - for paginationoffset- - 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 IdapiId- - api Idcomment- - comment to addcategory- - 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 IdapiId- - api Id- Throws:
ApiException- - throws if remove comment fails
-
updateAPIProduct
public ApiResponse<APIProductDTO> updateAPIProduct(APIProductDTO apiProductDTO) throws ApiException
- Throws:
ApiException
-
getEndpointCertificiates
public CertificatesDTO getEndpointCertificiates(String endpoint, String alias) throws ApiException
- Throws:
ApiException
-
getendpointCertificateContent
public CertificateInfoDTO getendpointCertificateContent(String alias) throws ApiException
- Throws:
ApiException
-
deleteEndpointCertificate
public ApiResponse<Void> deleteEndpointCertificate(String alias) throws ApiException
- Throws:
ApiException
-
changeAPIProductLifeCycleStatus
public WorkflowResponseDTO changeAPIProductLifeCycleStatus(String apiProductId, String action, String lifecycleChecklist) throws ApiException, APIManagerIntegrationTestException
Change the lifecycle status of API Product- Parameters:
apiProductId- UUID of api productaction- Lifecycle state change actionlifecycleChecklist- Lifecycle check list- Returns:
- WorkflowResponseDTO object
- Throws:
ApiException- If error when changing the lifecycle state of api productAPIManagerIntegrationTestException
-
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.
-
getAllCommonOperationPolicies
public Map<String,String> getAllCommonOperationPolicies(int limit) throws ApiException
- Throws:
ApiException
-
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 filesynapsePolicyDefinitionFile- - Synapse policy definitionccPolicyDefinitionFile- - 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 APIpolicySpecFile- - Policy specification filesynapsePolicyDefinitionFile- - Synapse policy definitionccPolicyDefinitionFile- - 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 IdapiId- - api Id- Throws:
ApiException- - throws if remove comment fails
-
importOperationPolicy
public ApiResponse<Void> importOperationPolicy(File file) throws ApiException
Import Operation Policy.- Parameters:
file- Policy File.- Returns:
- Throws:
ApiException
-
mapPolicyNameToId
public Map<String,String> mapPolicyNameToId(OperationPolicyDataListDTO policyList)
-
getCertificateUsage
public ApiResponse<APIMetadataListDTO> getCertificateUsage(String alias, Integer limit, Integer offset) throws ApiException
Get the Certificate usage.- Parameters:
alias- Alias of the certificatelimit- Number of results neededoffset- 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
-
getSettings
public SettingsDTO getSettings() throws ApiException
- Throws:
ApiException
-
-