Class RestAPIPublisherImpl
java.lang.Object
org.wso2.am.integration.test.impl.RestAPIPublisherImpl
This util class performs the actions related to APIDTOobjects.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.RestAPIPublisherImpl(String username, String password, String tenantDomain, String publisherURL) -
Method Summary
Modifier and TypeMethodDescriptionaddAPI(APICreationRequestBean apiCreationRequestBean) org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPI(APIRequest apiRequest) \ This method is used to create an API.addAPI(APIRequest apiRequest, String osVersion) \ This method is used to create an API.org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddApiEndpoint(String apiId, String name, String deploymentStage, Object endpointConfig) This method is used to add an API Endpoint.addApiProduct(APIProductDTO apiProductDTO) org.wso2.carbon.automation.test.utils.http.client.HttpResponseaddAPIProductRevision(APIRevisionRequest apiRevisionRequest) This method is used to create an API Product Revision.addAPIRevision(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.HttpResponseaddAPIWithMalformedContext(APIRequest apiRequest) org.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 documentationorg.wso2.carbon.automation.test.utils.http.client.HttpResponseaddGatewayPolicy(GatewayPolicyMappingsDTO gatewayPolicyMappingsDTO) Add a new gateway policyvoidaddGraphQLComplexityDetails(GraphQLQueryComplexityInfoDTO graphQLQueryComplexityInfoDTO, String apiID) Method to add GraphQL Complexity Info of an APIaddMCPServerRevision(String mcpServerId, APIRevisionDTO apiRevision) voidaddSequenceBackend(File file, String apiId, String type) Add Sequence Backend to the API EndpointaddSharedScope(ScopeDTO scopeDTO) Add a shared scopevoidThis method is used to block the created API.changeAPILifeCycleStatus(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 notchangeAPIProductLifeCycleStatus(String apiProductId, String action, String lifecycleChecklist) Change the lifecycle status of API ProductchangeMCPServerLifecycle(String action, String mcpServerId, String lifecycleChecklist) voidchangeSubscriptionBusinessPlan(String subscriptionId, String businessPlan, String ifMatch) Changes the business plan of a subscription.org.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.HttpResponsecopy API from existing APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponsecopyAPIProduct(String newVersion, String apiProductId, Boolean isDefault) copy API from existing API ProductcopyAPIWithReturnDTO(String newVersion, String apiId, Boolean isDefault) createMCPServerFromAPI(MCPServerDTO mcPServerDTO) createMCPServerFromOpenAPI(File file, String properties) createMCPServerProxy(MCPServerProxyRequestDTO mcpServerProxyRequest) createNewAPIVersion(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.HttpResponsedelete APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteApiEndpoint(String apiId, String endpointId) Delete an API endpointvoiddeleteApiProduct(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 DocumentdeleteEndpointCertificate(String alias) org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteGatewayPolicy(String gatewayPolicyMappingId) Delete gateway policyorg.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteMCPServer(String mcpServerId) deleteMCPServerRevision(String mcpServerId, String revisionId) 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.org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeployGatewayPolicy(String gatewayPolicyMappingId, List<GatewayPolicyDeploymentDTO> gatewayPolicyDeploymentDTO) Deploy gateway policydeployMCPServerRevision(String mcpServerId, String revisionId, List<APIRevisionDeploymentDTO> revisionDeploymentList) 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 APIgenerateInternalApiKey(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegenerateMockScript(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAIServiceProviderModels(String aiServiceProviderId) Get AI Service Provider's model listRetrieve the All APIs available for the user in Publisher.Method to get all API specific operation policiesMethod to get all common operation policiesgetAllCommonOperationPolicies(int limit) getAllCommonOperationPolicies(Integer limit, Integer offset, String query) Method to get all common operation policies passing limit, offset and query as parametersGet all shared scopesorg.wso2.carbon.automation.test.utils.http.client.HttpResponseMethod to get API informationgetAPIByID(String apiId) getAPIByID(String apiId, String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApiEndpoint(String apiId, String endpointId) Get a specific API endpoint by endpoint ID.org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApiEndpoints(String apiId) Get API endpoints for a given API UUID.getApiProduct(String apiProductId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAPIProductRevisions(String apiUUID, String query) Method to get API Product Revisions per APIgetAPIProductSwaggerByID(String apiProductId) getApiResourcePolicies(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 APIgetAPIs(int offset, int limit) This method is used to upload endpoint certificates Get APIs for the given limit and offset valuesgetAPISpecificOperationPolicy(String policyId, String apiId) Method to get API specific operation policy by policyIdgetAsyncAPIDefinitionOfAPI(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAuditApi(String apiId) Method to retrieve the Audit Report of an APIgetCertificateUsage(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 APIgetCommonOperationPolicy(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 documentsgetDocuments(String apiId) This method is used to get documents Get Documents for the given limit and offset valuesgetEndpointCertificiates(String endpoint, String alias) getGatewayPolicy(String gatewayPolicyMappingId) Get gateway policy by policy mapping UUIDorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetGenerateMockScript(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponseMethod to retrieve the GraphQL Complexity DetailsgetGraphqlSchemaDefinition(String apiId) getGraphQLSchemaTypeList(String apiId) Method to retrieve the GraphQL Schema Type Listorg.wso2.carbon.automation.test.utils.http.client.HttpResponseMethod to retrieve the GraphQL Schema Type ListgetLifecycleHistory(String apiId) getLifecycleHistoryOfApiProduct(String apiProductId) Get lifecycle state change history of an API Productorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetLifecycleStatus(String apiId) getLifecycleStatusDTO(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetLifecycleStatusOfApiProduct(String apiProductId) Get lifecycle state information of an API ProductRetrieve linter custom rulesorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetMCPServer(String mcpServerId) getMCPServerBackend(String mcpServerId, String backendId) getMCPServerRevisions(String mcpServerId) org.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 APIgetSharedScopeById(String uuid) Get a shared scopegetSubscriptionByAPIID(String apiID) Get subscription of an APIgetSubscriptionPolicies(String tierQuotaTypes) getSwaggerByID(String apiId) org.wso2.carbon.automation.test.utils.http.client.HttpResponseRetrieve the Tier Permission PageThis method is used to get all throttling tiers.importAsyncAPIDefinition(File file, String properties) importAsyncAPISchemaDefinition(File file, String url, String properties) importGraphqlSchemaDefinition(File file, String properties) importGraphqlSchemaDefinitionByURL(String url, String properties) org.wso2.carbon.automation.test.utils.http.client.HttpResponseimportGraphqlSchemaDefinitionWithInvalidContext(File file, String properties) importOASDefinition(File file, String properties) importOASDefinitionResponse(File file, String properties) importOperationPolicy(File file) Import Operation Policy.importWSDLSchemaDefinition(File file, String url, String properties, String type) 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 documentvoidRemove 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 tokensearchAPIs(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.Update an APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateAPI(APIRequest apiRequest, String apiId) Facilitate update APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApiEndpoint(String apiId, String endpointId, String name, String deploymentStage, Object endpointConfig) Update an API endpoint with name and deployment stageupdateAPIProduct(APIProductDTO apiProductDTO) updateApiResourcePolicies(String apiId, String resourcePolicyId, String resourcePath, ResourcePolicyInfoDTO resourcePolicyInfoDTO, String verb) updateAPIThumbnail(String apiId, File file) 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.org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateGatewayPolicy(String gatewayPolicyMappingId, GatewayPolicyMappingsDTO gatewayPolicyMappingsDTO) Update gateway policyvoidupdateGraphqlSchemaDefinition(String apiId, String schemaDefinition) updateMCPServer(String mcpServerId, MCPServerDTO mcPServerDTO) updateMCPServerBackend(String mcpServerId, String backendId, BackendDTO backend) 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 APIupdateSharedScope(String uuid, ScopeDTO scopeDTO) Update a shared scopesupdateSwagger(String apiId, String definition) org.wso2.carbon.automation.test.utils.http.client.HttpResponseThis method is used to upload certificatesuploadEndpointCertificate(File certificate, String alias, String endpoint) This method is used to upload certificatesvalidateAsyncAPISchemaDefinition(String url, File file) validateGraphqlSchemaDefinition(File schemaDefinition) validateGraphqlSchemaDefinitionByURL(String url, Boolean useIntrospection) validateOASDefinition(File oasDefinition) validateRoles(String roleId) This method is used to validate roles.validateWsdlDefinition(String url, File wsdlDefinition)
-
Field Details
-
appName
- See Also:
-
callBackURL
- See Also:
-
tokenScope
- See Also:
-
appOwner
- See Also:
-
grantType
- See Also:
-
username
- See Also:
-
password
- See Also:
-
testNameProperty
- See Also:
-
apIsApi
-
mcpServersApi
-
mcpServerRevisionsApi
-
mcpServerLifecycleApi
-
mcpServersBackendsApi
-
apiDocumentsApi
-
apiRevisionsApi
-
apiResourcePoliciesApi
-
apiProductRevisionsApi
-
throttlingPoliciesApi
-
clientCertificatesApi
-
endpointCertificatesApi
-
graphQlSchemaApi
-
graphQlSchemaIndividualApi
-
apiLifecycleApi
-
commentsApi
-
rolesApi
-
validationApi
-
subscriptionsApi
-
apiAuditApi
-
graphQlPoliciesApi
-
unifiedSearchApi
-
productLifecycleApi
-
apiPublisherClient
-
tenantDomain
-
accessToken
-
settingsApi
-
-
Constructor Details
-
RestAPIPublisherImpl
Deprecated. -
RestAPIPublisherImpl
-
-
Method Details
-
getAccessToken
-
setAccessToken
-
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.
-
addAPIWithMalformedContext
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addAPIWithMalformedContext(APIRequest apiRequest) -
addAPI
\ This method is used to create an API.- Parameters:
apiRequest-- Returns:
- HttpResponse
- Throws:
ApiException- throws of an error occurred when creating the API.
-
addAPI
- Throws:
ApiException
-
updateAPIThumbnail
- 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:
apiId- API id that need to published. return ApiResponsechange response. action- API id that need to published.- Throws:
ApiException- throws if an error occurred when publishing the API.APIManagerIntegrationTestException
-
changeAPILifeCycleStatus
public WorkflowResponseDTO changeAPILifeCycleStatus(String apiId, String action) throws ApiException, APIManagerIntegrationTestException -
deprecateAPI
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
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
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
- Throws:
ApiException
-
getLifecycleHistory
- 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
-
copyAPIProduct
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse copyAPIProduct(String newVersion, String apiProductId, Boolean isDefault) throws ApiException copy API from existing API Product- Parameters:
newVersion- - new version of the API ProductapiProductId- - existing API Product IdisDefault- - make the default version- Returns:
- - http response object
- Throws:
APIManagerIntegrationTestException- - Throws if error occurred at API Product copy operationApiException
-
copyAPIWithReturnDTO
public APIDTO copyAPIWithReturnDTO(String newVersion, String apiId, Boolean isDefault) throws ApiException - Parameters:
newVersion-apiId-isDefault-- Returns:
- Throws:
ApiException
-
addSequenceBackend
Add Sequence Backend to the API Endpoint- Parameters:
file- Sequence Backend fileapiId- APIIDtype- Key Type- Throws:
ApiException- API Exception if an error occurs
-
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
- 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
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
-
getAllAPIs
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
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
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
This method is used to get all throttling tiers.- Returns:
- - Response that contains all the available tiers
- Throws:
ApiException
-
getSubscriptionPolicies
- Throws:
ApiException
-
validateRoles
This method is used to validate roles.- Parameters:
roleId- role Id- Returns:
- HttpResponse
- Throws:
APIManagerIntegrationTestExceptionApiException
-
getSwaggerByID
- Throws:
ApiException
-
getAPIProductSwaggerByID
- Throws:
ApiException
-
updateSwagger
- Throws:
ApiException
-
validateOASDefinition
public OpenAPIDefinitionValidationResponseDTO validateOASDefinition(File oasDefinition) throws ApiException - Throws:
ApiException
-
getAPIByID
- Throws:
ApiException
-
getAPIByID
- Throws:
ApiException
-
importOASDefinition
- Throws:
ApiException
-
createMCPServerFromOpenAPI
- Throws:
ApiException
-
createMCPServerFromAPI
- Throws:
ApiException
-
createMCPServerProxy
public MCPServerDTO createMCPServerProxy(MCPServerProxyRequestDTO mcpServerProxyRequest) throws ApiException - Throws:
ApiException
-
getMCPServer
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getMCPServer(String mcpServerId) -
updateMCPServer
public MCPServerDTO updateMCPServer(String mcpServerId, MCPServerDTO mcPServerDTO) throws ApiException - Throws:
ApiException
-
getMCPServerBackend
- Throws:
ApiException
-
updateMCPServerBackend
public BackendDTO updateMCPServerBackend(String mcpServerId, String backendId, BackendDTO backend) throws ApiException - Throws:
ApiException
-
addMCPServerRevision
public APIRevisionDTO addMCPServerRevision(String mcpServerId, APIRevisionDTO apiRevision) throws ApiException - Throws:
ApiException
-
deleteMCPServerRevision
public APIRevisionListDTO deleteMCPServerRevision(String mcpServerId, String revisionId) throws ApiException - Throws:
ApiException
-
getMCPServerRevisions
- Throws:
ApiException
-
deployMCPServerRevision
public List<APIRevisionDeploymentDTO> deployMCPServerRevision(String mcpServerId, String revisionId, List<APIRevisionDeploymentDTO> revisionDeploymentList) throws ApiException - Throws:
ApiException
-
changeMCPServerLifecycle
public WorkflowResponseDTO changeMCPServerLifecycle(String action, String mcpServerId, String lifecycleChecklist) throws ApiException - Throws:
ApiException
-
deleteMCPServer
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteMCPServer(String mcpServerId) 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
-
validateGraphqlSchemaDefinitionByURL
public GraphQLValidationResponseDTO validateGraphqlSchemaDefinitionByURL(String url, Boolean useIntrospection) throws ApiException - Throws:
ApiException
-
importGraphqlSchemaDefinition
- Throws:
ApiException
-
importGraphqlSchemaDefinitionByURL
- Throws:
ApiException
-
getGraphqlSchemaDefinition
- Throws:
ApiException
-
updateGraphqlSchemaDefinition
public void updateGraphqlSchemaDefinition(String apiId, String schemaDefinition) throws ApiException - Throws:
ApiException
-
importGraphqlSchemaDefinitionWithInvalidContext
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse importGraphqlSchemaDefinitionWithInvalidContext(File file, String properties) 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
- 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
- Throws:
ApiException
-
addAPI
- Throws:
ApiException
-
uploadCertificate
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse uploadCertificate(File certificate, String alias, String apiId, String tier, String keyType) throws ApiException This method is used to upload certificates- Parameters:
certificate- certificatealias- aliskeyType- key type (whether PRODUCTION or SANDBOX)- Returns:
- Throws:
ApiException- if an error occurred while uploading the certificate.
-
updateAPI
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
Get subscription of an API- Parameters:
apiID-- Returns:
- Throws:
ApiException
-
getAllApiProducts
- Throws:
ApiException
-
getApiProduct
- Throws:
ApiException
-
addApiProduct
- Throws:
ApiException
-
deleteApiProduct
- 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
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:
graphQLQueryComplexityInfoDTO- GraphQL Complexity ObjectapiID-- 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
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
- 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
- Throws:
ApiException
-
getEndpointCertificiates
- Throws:
ApiException
-
getendpointCertificateContent
- Throws:
ApiException
-
deleteEndpointCertificate
- 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
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
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(Integer limit, Integer offset, String query) throws ApiException Method to get all common operation policies passing limit, offset and query as parameters- Parameters:
limit- limitoffset- offsetquery- query- Returns:
- A map of policy name and policy UUID
- Throws:
ApiException- - Throws if policy information cannot be retrieved.
-
getAllCommonOperationPolicies
- Throws:
ApiException
-
getAllAPISpecificOperationPolicies
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
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
Import Operation Policy.- Parameters:
file- Policy File.- Returns:
- Throws:
ApiException
-
mapPolicyNameToId
-
addGatewayPolicy
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addGatewayPolicy(GatewayPolicyMappingsDTO gatewayPolicyMappingsDTO) Add a new gateway policy- Parameters:
gatewayPolicyMappingsDTO- Gateway policy mapping DTO- Returns:
- http response of add gateway policy
- Throws:
ApiException- - throws if add gateway policy fails
-
deployGatewayPolicy
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deployGatewayPolicy(String gatewayPolicyMappingId, List<GatewayPolicyDeploymentDTO> gatewayPolicyDeploymentDTO) Deploy gateway policy- Parameters:
gatewayPolicyMappingId- Gateway policy mapping IdgatewayPolicyDeploymentDTO- Gateway policy deployment DTO- Returns:
- http response of add gateway policy
- Throws:
ApiException- - throws if add gateway policy fails
-
deleteGatewayPolicy
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteGatewayPolicy(String gatewayPolicyMappingId) Delete gateway policy- Parameters:
gatewayPolicyMappingId- Gateway policy mapping Id to be deleted- Returns:
- http response of add gateway policy
- Throws:
ApiException- - throws if add gateway policy fails
-
getGatewayPolicy
Get gateway policy by policy mapping UUID- Parameters:
gatewayPolicyMappingId- Gateway policy mapping Id to be retrieved- Returns:
- GatewayPolicyMappingsDTO Gateway policy mapping DTO
- Throws:
ApiException- - throws if add gateway policy fails
-
updateGatewayPolicy
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateGatewayPolicy(String gatewayPolicyMappingId, GatewayPolicyMappingsDTO gatewayPolicyMappingsDTO) Update gateway policy- Parameters:
gatewayPolicyMappingId- Gateway policy mapping IdgatewayPolicyMappingsDTO- Gateway policy mapping DTO- Returns:
- http response of add gateway policy
- Throws:
ApiException- - throws if add gateway policy fails
-
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
Retrieve linter custom rules- Returns:
- - linter custom rules JSONObject
- Throws:
ApiException- - throws if get linter custom rules fails
-
getSettings
- Throws:
ApiException
-
changeSubscriptionBusinessPlan
public void changeSubscriptionBusinessPlan(String subscriptionId, String businessPlan, String ifMatch) throws ApiException Changes the business plan of a subscription.- Parameters:
subscriptionId- the ID of the subscription to be updatedbusinessPlan- the new business plan to be assigned to the subscriptionifMatch- the ETag value to check for concurrency control- Throws:
ApiException- if an error occurs while changing the business plan
-
addApiEndpoint
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addApiEndpoint(String apiId, String name, String deploymentStage, Object endpointConfig) throws ApiException This method is used to add an API Endpoint.- Parameters:
apiId- API UUIDname- API endpoint namedeploymentStage- Deployment stage: Production or SandboxendpointConfig- Endpoint configuration object- Returns:
- HttpResponse
- Throws:
ApiException- throws if an error occurred when creating the API Endpoint
-
updateApiEndpoint
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApiEndpoint(String apiId, String endpointId, String name, String deploymentStage, Object endpointConfig) throws ApiException Update an API endpoint with name and deployment stage- Parameters:
apiId- API IDendpointId- API endpoint IDname- Endpoint namedeploymentStage- Deployment stageendpointConfig- API endpoint configuration- Returns:
- HttpResponse
- Throws:
ApiException- throws if an error occurred when updating the API endpoint
-
deleteApiEndpoint
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteApiEndpoint(String apiId, String endpointId) throws ApiException Delete an API endpoint- Parameters:
apiId- API IDendpointId- API endpoint ID- Returns:
- HttpResponse
- Throws:
ApiException- throws if an error occurred when deleting the API endpoint
-
getApiEndpoints
Get API endpoints for a given API UUID.- Parameters:
apiId- API UUID- Returns:
- HttpResponse
- Throws:
ApiException- throws if an error occurred when retrieving the API endpoints
-
getApiEndpoint
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getApiEndpoint(String apiId, String endpointId) throws ApiException Get a specific API endpoint by endpoint ID.- Parameters:
apiId- API UUIDendpointId- API endpoint ID- Returns:
- HttpResponse
- Throws:
ApiException- throws if an error occurred when retrieving the API endpoint
-
getAIServiceProviderModels
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAIServiceProviderModels(String aiServiceProviderId) Get AI Service Provider's model list- Parameters:
aiServiceProviderId- AI service provider ID- Returns:
- HttpResponse
-