Class RestAPIStoreImpl
java.lang.Object
org.wso2.am.integration.test.impl.RestAPIStoreImpl
This util class performs the actions related to APIDTOobjects.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRestAPIStoreImpl(String tenantDomain, String storeURL) RestAPIStoreImpl(String username, String password, String tenantDomain, String storeURL) -
Method Summary
Modifier and TypeMethodDescriptionaddApplication(String application, String tier, String callbackUrl, String description) Add applicationaddApplicationWithTokenType(String application, String tier, String callbackUrl, String description, String tokenType) Add application with token typeorg.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.HttpResponseAdd rating into apiapplicationsPostWithHttpInfo(String application, String tier, String description) Add applicationorg.wso2.carbon.automation.test.utils.http.client.HttpResponsechangePassword(String currentPassword, String newPassword) Change password of the userorg.wso2.carbon.automation.test.utils.http.client.HttpResponsecleanUpApplicationRegistrationByApplicationId(String applicationId, String keyType) Clean up application registration by IDorg.wso2.carbon.automation.test.utils.http.client.HttpResponsecreateApplication(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) org.wso2.carbon.automation.test.utils.http.client.HttpResponsecreateApplicationWithCustomAttribute(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, Map<String, String> attribute) createApplicationWithHttpInfo(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) org.wso2.carbon.automation.test.utils.http.client.HttpResponsecreateApplicationWithOrganization(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, List<String> groups) org.wso2.carbon.automation.test.utils.http.client.HttpResponsecreateApplicationWithOrganizationSharing(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, ApplicationDTO.VisibilityEnum orgVisibility) org.wso2.carbon.automation.test.utils.http.client.HttpResponsecreateSubscription(String apiId, String applicationId, String subscriptionTier) org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteApplication(String applicationId) org.wso2.carbon.automation.test.utils.http.client.HttpResponsedeleteApplicationWithHttpResponse(String applicationId) downloadWSDLSchemaDefinitionOfAPI(String apiId, String environmentName) org.wso2.carbon.automation.test.utils.http.client.HttpResponseeditComment(String commentId, String apiId, String comment, String category) Get Comment from given APIgenerateAPIKeys(String applicationId, String keyType, int validityPeriod, String permittedIP, String permittedReferer, String keyName) generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes) generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes, String keyManager) generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties, String keyManager) generateKeysWithAdditionalProperties(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties) generateKeysWithApiResponse(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties, String keyManager) generateKeysWithHttpInfo(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes, String keyManager) ApiResponse<byte[]> generateSDKUpdated(String apiId, String language) Generate SDK for a given programming languageApiResponse<byte[]> generateSDKUpdated(String apiId, String language, String tenantDomain) Generate SDK for a given programming languageorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegenerateUserAccessKey(String consumeKey, String consumerSecret, String messageBody, URL tokenEndpointURL) Generate user access keygetAllAPIs(String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllDocumentationOfAPI(String apiName, String version, String provider) Method to retrieve all documents of given apigetAllMCPServers(Integer limit, Integer offset, String xWSO2Tenant, String query) org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllPaginatedPublishedAPIs(String tenant, int start, int end) Gell all paginated published apis for a given tenantorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllPaginatedPublishedAPIs(String tenant, String start, String end) Get all paginated published API for a given tenantGet all published apisorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllPublishedAPIs(String tenant) Get all published APIs for tenantgetAllSubscriptionsOfApplication(String applicationId) Get All subscriptions for an application.getAllSubscriptionsOfApplication(String applicationId, String tenantDomain) Get All subscriptions for an application.Get all API tagsGet api which are publishedGet api which are publishedorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApiEndpointUrls(String apiName, String version, String provider) Method to retrieve all endpoint urlsgetAPIKeys(String applicationId, String keyType) getAPIListFromStoreAsAnonymousUser(String tenantDomain) getAPIs(int offset, int limit) Get APIs for the given limit and offset valuesGet APIs for the given limit, offset values and querygetAPIsFilteredWithTags(String apiTag) Get the web page with filtered API when click the API Tag linkgetApplicationById(String applicationId) Get application by IDgetApplicationById(String applicationId, String tenantDomain) Get application by IDorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApplicationByIdWithHttpResponse(String applicationId) Get application by ID with Http response detailsgetApplicationKeyByKeyMappingId(String applicationId, String keyMappingId) getApplicationKeysByAppId(String jwtAppId) getApplicationKeysByKeyType(String applicationId, String keyType) Regenerate consumer secret of an applicationgetApplicationOauthKeys(String applicationUUID, String tenantDomain) getApplicationPolicies(String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponseGet applicationgetApplications(String applicationName) 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 APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseMethod to retrieve the GraphQL Complexity Detailsorg.wso2.carbon.automation.test.utils.http.client.HttpResponseMethod to retrieve the GraphQL Schema Type ListgetKeyManagers(String tenantDomain) getPrototypedAPIs(String tenant) Get Prototyped APIs in Storeorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetPublishedAPIsByApplication(String applicationName) Get application details by given nameorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetPublishedAPIsByApplicationId(String applicationName, int applicationId) Get application details by given nameorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetRecentlyAddedAPIs(String tenant, String limit) Get recently added APIs by tenantorg.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 APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetSubscribedAPIs(String applicationName) Get subscribed Apis by application nameorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetSubscribedAPIs(String applicationName, String domain) Get subscribed APIs for the specific ApplicationgetSubscription(String apiId, String applicationId, String apiType, String groupId) getSwaggerByID(String apiId, String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponseorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetWebhooks(String apiId, String applicationId, String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponseCheck whether commenting is enabledorg.wso2.carbon.automation.test.utils.http.client.HttpResponseCheck if API rating activatedorg.wso2.carbon.automation.test.utils.http.client.HttpResponselogout()API Store logoutmapConsumerKeyWithApplication(String consumerKey, String consumerSecret, String appid, String keyManager) org.wso2.carbon.automation.test.utils.http.client.HttpResponseregenerateConsumerSecret(String clientId) Regenerate consumer secret.regenerateConsumerSecret(String applicationId, String keyType) Regenerate consumer secret of an applicationregenerateSecretByKeyMappingId(String applicationId, String keyMappingId) Regenerate Consumer Secret by key mapping IDorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveAPISubscription(String API, String version, String provider, String applicationId) Unsubscribe from APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveAPISubscriptionByApplicationName(String API, String version, String provider, String applicationName) Unsubscribe from API by application nameorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveAPISubscriptionByName(String API, String version, String provider, String appName) Unsubscribe from APIvoidremoveApplicationById(String applicationId) Delete application by Idorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveComment(String commentId, String apiId) Remove comment in given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveRating(String apiId, String tenantDomain) Remove rating from given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveRatingFromAPI(String apiName, String version, String provider) Remove rating of given APIorg.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveSubscription(SubscriptionDTO subscriptionDTO) org.wso2.carbon.automation.test.utils.http.client.HttpResponseremoveSubscriptionWithHttpInfo(String subscriptionId) resetApplicationThrottlePolicy(String applicationId, String userId) Reset Application Throttle policy for given application and uservoidrevokeAPIKey(String applicationId, String apiKey) voidrevokeAPIKeyByKeyUUID(String applicationId, String keyType, String keyUUID) searchAPIs(String query) Retrieve the APIs according to the search query in Publisher.searchAPIs(String query, String tenantDomain) Retrieve the APIs according to the search query in Publisher.searchPaginatedAPIs(int limit, int offset, String tenantDomain, String query) Get the web page with filtered API when click the API Tag linkvoidsetAccessToken(String accessToken) org.wso2.carbon.automation.test.utils.http.client.HttpResponseAPI Store sign uporg.wso2.carbon.automation.test.utils.http.client.HttpResponsesignUpforTenant(String userName, String password, String claims) API Store sign upsubscribeToAPI(String apiID, String appID, String tier) subscribeToAPI(String apiID, String appID, String tier, String tenantDomain) org.wso2.carbon.automation.test.utils.http.client.HttpResponsesubscribeToAPIWithResponse(String apiID, String appID, String tier) org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplication(String applicationOld, String applicationNew, String callbackUrlNew, String descriptionNew, String tier) Update given applicationorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationById(int applicationId, String applicationOld, String applicationNew, String callbackUrlNew, String descriptionNew, String tier) Update given applicationorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationByID(String applicationId, String appName, String description, String throttleTier) org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationByID(String applicationId, String appName, String description, String throttleTier, Map<String, String> attributes) Updates an existing application with the provided details and custom attributes.org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, List<String> groups) Update shared Application by ID with the organizationorg.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, ApplicationDTO.VisibilityEnum orgVisibility) updateApplicationKeyByKeyMappingId(String applicationId, String keyMappingId, ApplicationKeyDTO applicationKeyDTO) org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateClientApplicationById(String applicationId, ApplicationDTO applicationDTO) Update given Auth applicationupdateKeys(String applicationId, String keyType, ApplicationKeyDTO applicationKeyDTO) Regenerate consumer secret of an applicationupdateSubscriptionToAPI(String apiID, String appID, String existingTier, String requestedTier, SubscriptionDTO.StatusEnum subscriptionStatus, String subscriptionId, String xWso2Tenant) Update subscription to an API of a specific tenant
-
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
-
applicationsApi
-
subscriptionIndividualApi
-
applicationKeysApi
-
commentsApi
-
ratingsApi
-
tagsApi
-
sdKsApi
-
apiKeysApi
-
unifiedSearchApi
-
keyManagersCollectionApi
-
graphQlPoliciesApi
-
throttlingPoliciesApi
-
usersApi
-
topicsApi
-
webhooksApi
-
mcpServersApi
-
storeURL
-
tenantDomain
-
-
Constructor Details
-
RestAPIStoreImpl
-
RestAPIStoreImpl
-
-
Method Details
-
getAccessToken
-
setAccessToken
-
createApplication
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse createApplication(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) throws APIManagerIntegrationTestException -
createApplicationWithHttpInfo
public ApiResponse<ApplicationDTO> createApplicationWithHttpInfo(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) throws ApiException - Throws:
ApiException
-
createApplicationWithOrganization
-
createApplicationWithOrganizationSharing
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse createApplicationWithOrganizationSharing(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, ApplicationDTO.VisibilityEnum orgVisibility) throws APIManagerIntegrationTestException -
createApplicationWithCustomAttribute
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse createApplicationWithCustomAttribute(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, Map<String, String> attribute) throws APIManagerIntegrationTestException -
deleteApplication
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteApplication(String applicationId) -
deleteApplicationWithHttpResponse
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse deleteApplicationWithHttpResponse(String applicationId) -
getAllApps
- Throws:
ApiException
-
updateApplicationByID
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType) -
updateApplicationByID
-
updateApplicationByID
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, ApplicationDTO.VisibilityEnum orgVisibility) -
updateApplicationByID
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplicationByID(String applicationId, String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, List<String> groups) Update shared Application by ID with the organization -
updateApplicationByID
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplicationByID(String applicationId, String appName, String description, String throttleTier, Map<String, String> attributes) Updates an existing application with the provided details and custom attributes.- Parameters:
applicationId- The unique identifier of the application to be updated.appName- The new name of the application.description- The updated description of the application.throttleTier- The throttling policy (application tier) to be applied to the application.attributes- A map containing custom application attributes to be associated with the application.- Returns:
HttpResponsecontaining the response body and HTTP status code. Returns status code200if the application update is successful. If an error occurs, the response will contain the error body and the corresponding HTTP status code returned by the API.
-
createSubscription
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse createSubscription(String apiId, String applicationId, String subscriptionTier) throws APIManagerIntegrationTestException -
getSubscription
public SubscriptionListDTO getSubscription(String apiId, String applicationId, String apiType, String groupId) throws ApiException - Throws:
ApiException
-
removeSubscription
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeSubscription(SubscriptionDTO subscriptionDTO) throws ApiException, APIManagerIntegrationTestException -
removeSubscriptionWithHttpInfo
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeSubscriptionWithHttpInfo(String subscriptionId) -
generateKeys
public ApplicationKeyDTO generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes) throws ApiException, APIManagerIntegrationTestException -
generateKeys
public ApplicationKeyDTO generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties, String keyManager) throws ApiException, APIManagerIntegrationTestException -
generateKeysWithAdditionalProperties
public ApplicationKeyDTO generateKeysWithAdditionalProperties(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties) throws ApiException, APIManagerIntegrationTestException -
generateKeysWithApiResponse
public ApiResponse<ApplicationKeyDTO> generateKeysWithApiResponse(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String, Object> additionalProperties, String keyManager) throws ApiException- Throws:
ApiException
-
generateAPIKeys
public APIKeyDTO generateAPIKeys(String applicationId, String keyType, int validityPeriod, String permittedIP, String permittedReferer, String keyName) throws ApiException - Throws:
ApiException
-
getAPIKeys
- Throws:
ApiException
-
revokeAPIKey
- Throws:
ApiException
-
revokeAPIKeyByKeyUUID
public void revokeAPIKeyByKeyUUID(String applicationId, String keyType, String keyUUID) throws ApiException - Throws:
ApiException
-
updateKeys
public ApiResponse<ApplicationKeyDTO> updateKeys(String applicationId, String keyType, ApplicationKeyDTO applicationKeyDTO) throws Exception Regenerate consumer secret of an application- Parameters:
applicationId- - ID of the applicationkeyType- - PRODUCTION or SANDBOXapplicationKeyDTO- - application DTO to be updated- Returns:
- - APIResponse of update request
- Throws:
ApiException- - throws if update keys fails.Exception
-
regenerateConsumerSecret
public ApiResponse<ApplicationKeyReGenerateResponseDTO> regenerateConsumerSecret(String applicationId, String keyType) throws Exception Regenerate consumer secret of an application- Parameters:
applicationId- - ID of the applicationkeyType- - PRODUCTION or SANDBOX- Returns:
- - APIResponse of re-generate request
- Throws:
ApiException- - throws if consumer secret re-generationx fails.Exception
-
getApplicationKeysByKeyType
public ApiResponse<ApplicationKeyDTO> getApplicationKeysByKeyType(String applicationId, String keyType) throws Exception Regenerate consumer secret of an application- Parameters:
applicationId- - ID of the applicationkeyType- - PRODUCTION or SANDBOX- Returns:
- - APIResponse of get application keys request
- Throws:
ApiException- - throws if get application keys fails.Exception
-
regenerateSecretByKeyMappingId
public ApplicationKeyReGenerateResponseDTO regenerateSecretByKeyMappingId(String applicationId, String keyMappingId) throws ApiException Regenerate Consumer Secret by key mapping ID- Parameters:
applicationId- ID of the applicationkeyMappingId- Keymapping Id- Returns:
- APIResponse of re-generate request
- Throws:
ExceptionApiException
-
getAPI
Get api which are published- Returns:
- - http response of get API post request
- Throws:
ApiException- - throws if API information retrieval fails.
-
getAPI
Get api which are published- Returns:
- - http response of get API post request
- Throws:
ApiException- - throws if API information retrieval fails.
-
getAllPublishedAPIs
Get all published apis- Returns:
- - http response of get all published apis
- Throws:
APIManagerIntegrationTestException- - throws if getting publish APIs fails
-
getAllAPIs
- Returns:
- Throws:
ApiException
-
getAllAPIs
- Returns:
- Throws:
ApiException
-
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
-
searchAPIs
Retrieve the APIs according to the search query in Publisher.- Parameters:
query- - The query on which the APIs needs to be filteredtenantDomain- - The tenant domain on which the APIs needs to be filtered- Returns:
- SearchResultListDTO - The search results of the query
- Throws:
ApiException
-
getAPIs
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
-
getAPIs
public APIListDTO getAPIs(int offset, int limit, String tenantDomain, String query) throws ApiException Get APIs for the given limit, offset values and query- Parameters:
offset- starting positionlimit- maximum number of APIs to returntenantDomain- tenant domainquery- search query- Returns:
- APIs for the given limit and offset values
- Throws:
ApiException
-
getApplicationById
Get application by ID- Returns:
- - http response of get of application
- Throws:
ApiException- - throws if get application fails.
-
getApplicationByIdWithHttpResponse
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getApplicationByIdWithHttpResponse(String applicationId) Get application by ID with Http response details- Returns:
- - http response of get of application
-
getApplicationById
public ApplicationDTO getApplicationById(String applicationId, String tenantDomain) throws ApiException Get application by ID- Returns:
- - http response of get of application
- Throws:
ApiException- - throws if get application fails.
-
getPublishedAPIsByApplication
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getPublishedAPIsByApplication(String applicationName) throws APIManagerIntegrationTestException Get application details by given name- Parameters:
applicationName- - application name- Returns:
- - http response of get application request
- Throws:
APIManagerIntegrationTestException- - throws if get application by name fails
-
getPublishedAPIsByApplicationId
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getPublishedAPIsByApplicationId(String applicationName, int applicationId) throws APIManagerIntegrationTestException Get application details by given name- Parameters:
applicationName- - application name- Returns:
- - http response of get application request
- Throws:
APIManagerIntegrationTestException- - throws if get application by name fails
-
addRating
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse addRating(String apiId, Integer rating, String tenantDomain) throws ApiException Add rating into api- Parameters:
apiId- - api Idrating- - api ratingtenantDomain- - tenant domain- Returns:
- - http response of add rating request
- Throws:
ApiException- - throws if rating of api fails
-
removeRating
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeRating(String apiId, String tenantDomain) Remove rating from given API- Parameters:
apiId- - api IdtenantDomain- - tenant domain- Throws:
ApiException- - throws if remove rating fails
-
removeRatingFromAPI
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeRatingFromAPI(String apiName, String version, String provider) throws APIManagerIntegrationTestException Remove rating of given API- Parameters:
apiName- - name of apiversion- - api versionprovider- - provider of api- Returns:
- - http response of remove rating request
- Throws:
APIManagerIntegrationTestException- - Throws if remove API rating fails
-
isRatingActivated
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse isRatingActivated() throws APIManagerIntegrationTestExceptionCheck if API rating activated- Returns:
- - http response of rating activated request
- Throws:
APIManagerIntegrationTestException- - Throws if rating status cannot be retrieved
-
getAllDocumentationOfAPI
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAllDocumentationOfAPI(String apiName, String version, String provider) throws APIManagerIntegrationTestException Method to retrieve all documents of given api- Parameters:
apiName- - name of apiversion- - api versionprovider- - provider of api- Returns:
- - http response of get all documentation of APIs
- Throws:
APIManagerIntegrationTestException- - throws if retrieval of API documentation fails
-
getApiEndpointUrls
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getApiEndpointUrls(String apiName, String version, String provider) throws APIManagerIntegrationTestException Method to retrieve all endpoint urls -
getAllPaginatedPublishedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAllPaginatedPublishedAPIs(String tenant, String start, String end) throws APIManagerIntegrationTestException Get all paginated published API for a given tenant- Parameters:
tenant- - tenant namestart- - starting indexend- - closing index- Returns:
- - http response of paginated published APIs
- Throws:
APIManagerIntegrationTestException- - throws if paginated apis cannot be retrieved.
-
cleanUpApplicationRegistrationByApplicationId
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse cleanUpApplicationRegistrationByApplicationId(String applicationId, String keyType) throws APIManagerIntegrationTestException, ApiException Clean up application registration by ID- Parameters:
applicationId- - application IDkeyType- - key type- Returns:
- - http response of paginated published APIs
- Throws:
APIManagerIntegrationTestException- - throws if paginated apis cannot be retrieved.ApiException
-
getAllPaginatedPublishedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAllPaginatedPublishedAPIs(String tenant, int start, int end) throws APIManagerIntegrationTestException Gell all paginated published apis for a given tenant- Parameters:
tenant- - tenant namestart- - starting indexend- - ending index- Throws:
APIManagerIntegrationTestException
-
getAllPublishedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getAllPublishedAPIs(String tenant) throws APIManagerIntegrationTestException Get all published APIs for tenant- Parameters:
tenant- - tenant name- Returns:
- - http response of published API
- Throws:
APIManagerIntegrationTestException- - throws if published API retrieval fails.
-
addApplication
public ApplicationDTO addApplication(String application, String tier, String callbackUrl, String description) throws ApiException, APIManagerIntegrationTestException Add application- Parameters:
application- - application nametier- - throttling tiercallbackUrl- - callback urldescription- - description of app- Returns:
- - http response of add application
- Throws:
APIManagerIntegrationTestException- - if fails to add applicationApiException
-
applicationsPostWithHttpInfo
public ApiResponse<ApplicationDTO> applicationsPostWithHttpInfo(String application, String tier, String description) throws ApiException, APIManagerIntegrationTestException Add application- Parameters:
application- - application nametier- - throttling tierdescription- - description of app- Returns:
- - http response of add application
- Throws:
APIManagerIntegrationTestException- - if fails to add applicationApiException
-
addApplicationWithTokenType
public ApplicationDTO addApplicationWithTokenType(String application, String tier, String callbackUrl, String description, String tokenType) throws ApiException, APIManagerIntegrationTestException Add application with token type- Parameters:
application- - application nametier- - throttling tierdescription- - description of apptokenType- - token type of app (JWT ot DEFAULT)- Returns:
- - ApplicationDTO of add application
- Throws:
APIManagerIntegrationTestException- - if fails to add applicationApiException
-
getApplications
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getApplications() throws APIManagerIntegrationTestExceptionGet application- Returns:
- - http response of get applications
- Throws:
APIManagerIntegrationTestException- - throws if applications cannot be retrieved.
-
removeApplicationById
Delete application by Id- Parameters:
applicationId- - application Id- Throws:
APIManagerIntegrationTestException- - throws if remove application failsApiException
-
updateApplication
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplication(String applicationOld, String applicationNew, String callbackUrlNew, String descriptionNew, String tier) throws APIManagerIntegrationTestException Update given application- Parameters:
applicationOld- - application name oldapplicationNew- - new application namecallbackUrlNew- - call back urldescriptionNew- - updated descriptiontier- - access tier- Returns:
- - http response of update application
- Throws:
APIManagerIntegrationTestException- - throws if update application fails
-
resetApplicationThrottlePolicy
public ApiResponse<Void> resetApplicationThrottlePolicy(String applicationId, String userId) throws APIManagerIntegrationTestException Reset Application Throttle policy for given application and user- Parameters:
applicationId- - uuid of the applicationuserId- - username for which the policy should be reset- Returns:
- - http response of reset application throttle policy
- Throws:
APIManagerIntegrationTestException
-
updateApplicationById
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateApplicationById(int applicationId, String applicationOld, String applicationNew, String callbackUrlNew, String descriptionNew, String tier) throws APIManagerIntegrationTestException Update given application- Parameters:
applicationOld- - application name oldapplicationNew- - new application namecallbackUrlNew- - call back urldescriptionNew- - updated descriptiontier- - access tier- Returns:
- - http response of update application
- Throws:
APIManagerIntegrationTestException- - throws if update application fails
-
updateClientApplicationById
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse updateClientApplicationById(String applicationId, ApplicationDTO applicationDTO) Update given Auth application- Parameters:
applicationId- auth application idapplicationDTO- DTO of the application- Returns:
- Http response of the update request
- Throws:
APIManagerIntegrationTestException- APIManagerIntegrationTestException - throws if update application fail
-
regenerateConsumerSecret
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse regenerateConsumerSecret(String clientId) throws APIManagerIntegrationTestException Regenerate consumer secret.- Parameters:
clientId- Consumer Key of an application for which consumer secret need to be regenerate.- Returns:
- Regenerated consumer secret.
- Throws:
APIManagerIntegrationTestException- Throws if regeneration of consumer secret fail.
-
getAllSubscriptionsOfApplication
public SubscriptionListDTO getAllSubscriptionsOfApplication(String applicationId) throws ApiException Get All subscriptions for an application.- Parameters:
applicationId- application- Returns:
- Throws:
ApiException- Throws if an error occurred when getting subscriptions.
-
getAllSubscriptionsOfApplication
public SubscriptionListDTO getAllSubscriptionsOfApplication(String applicationId, String tenantDomain) throws ApiException Get All subscriptions for an application.- Parameters:
applicationId- applicationtenantDomain- requestedTenant- Returns:
- Throws:
ApiException- Throws if an error occurred when getting subscriptions.
-
getSubscribedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getSubscribedAPIs(String applicationName) throws APIManagerIntegrationTestException Get subscribed Apis by application name- Parameters:
applicationName- - Application Name- Throws:
APIManagerIntegrationTestException
-
getSubscribedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getSubscribedAPIs(String applicationName, String domain) throws APIManagerIntegrationTestException Get subscribed APIs for the specific Application- Parameters:
applicationName- - Name of the Application of API in store- Returns:
- - HttpResponse - Response with subscribed APIs
- Throws:
APIManagerIntegrationTestException
-
removeAPISubscription
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeAPISubscription(String API, String version, String provider, String applicationId) throws APIManagerIntegrationTestException Unsubscribe from API- Parameters:
API- - name of apiversion- - api versionprovider- - provider nameapplicationId- - application id- Returns:
- - http response of unsubscription request
- Throws:
APIManagerIntegrationTestException- - Throws if unsubscription fails
-
removeAPISubscriptionByApplicationName
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeAPISubscriptionByApplicationName(String API, String version, String provider, String applicationName) throws APIManagerIntegrationTestException Unsubscribe from API by application name- Parameters:
API- - name of apiversion- - api versionprovider- - provider nameapplicationName- - application Name- Returns:
- - http response of unsubscription request
- Throws:
APIManagerIntegrationTestException- - Throws if unsubscription fails
-
removeAPISubscriptionByName
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse removeAPISubscriptionByName(String API, String version, String provider, String appName) throws APIManagerIntegrationTestException Unsubscribe from API- Parameters:
API- - name of apiversion- - api versionprovider- - provider nameappName- - application name- Returns:
- - http response of unsubscription request
- Throws:
APIManagerIntegrationTestException- - Throws if unsubscription fails
-
getAllTags
Get all API tags- Returns:
- - http response of get all api tags
- Throws:
APIManagerIntegrationTestException- - throws if get all tags failsApiException
-
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
-
getTopics
-
getWebhooks
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getWebhooks(String apiId, String applicationId, String tenantDomain) throws ApiException - Throws:
ApiException
-
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
-
isCommentActivated
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse isCommentActivated() throws APIManagerIntegrationTestExceptionCheck whether commenting is enabled- Returns:
- - http response of comment status
- Throws:
APIManagerIntegrationTestException- - Throws if retrieving comment activation status fails.
-
getRecentlyAddedAPIs
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getRecentlyAddedAPIs(String tenant, String limit) throws APIManagerIntegrationTestException Get recently added APIs by tenant- Parameters:
tenant- - tenant namelimit- - limit of result set- Returns:
- - http response of recently added API request
- Throws:
APIManagerIntegrationTestException- - throws if
-
getAPIsFilteredWithTags
public APIListDTO getAPIsFilteredWithTags(String apiTag) throws APIManagerIntegrationTestException, ApiException Get the web page with filtered API when click the API Tag link- Parameters:
apiTag- - API tag the need ti filter the api.waitForSwaggerDocument- Returns:
- HttpResponse - Response that contains the web page with filtered API when click the API Tag link
- Throws:
APIManagerIntegrationTestException- - Exception throws when check the Authentication and HTTPSClientUtils.sendGetRequest() method callApiException
-
searchPaginatedAPIs
public APIListDTO searchPaginatedAPIs(int limit, int offset, String tenantDomain, String query) throws ApiException Get the web page with filtered API when click the API Tag link- Parameters:
limit- - number of APIs needs to be returnedoffset- - offset where the APIs needs to be returned should starttenantDomain- - tenant domain of which the APIs to be returnedquery- - query that needs to be passed to the backend- Returns:
- APIListDTO - The DTO which contains the list of matching APIs
- Throws:
ApiException- - Exception throws when check the Authentication and HTTPSClientUtils.sendGetRequest() method call
-
subscribeToAPI
public SubscriptionDTO subscribeToAPI(String apiID, String appID, String tier) throws ApiException, APIManagerIntegrationTestException -
subscribeToAPI
public SubscriptionDTO subscribeToAPI(String apiID, String appID, String tier, String tenantDomain) throws ApiException, APIManagerIntegrationTestException -
subscribeToAPIWithResponse
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse subscribeToAPIWithResponse(String apiID, String appID, String tier) throws ApiException, APIManagerIntegrationTestException -
updateSubscriptionToAPI
public SubscriptionDTO updateSubscriptionToAPI(String apiID, String appID, String existingTier, String requestedTier, SubscriptionDTO.StatusEnum subscriptionStatus, String subscriptionId, String xWso2Tenant) throws ApiException, APIManagerIntegrationTestException Update subscription to an API of a specific tenant- Parameters:
apiID- API IDappID- Application IDexistingTier- Existing subscription TierrequestedTier- Requested subscription TiersubscriptionStatus- subscription statussubscriptionId- Subscription IDxWso2Tenant- Tenant Domain- Returns:
- SubscriptionDTO
- Throws:
ApiException- If an API exception occurs.APIManagerIntegrationTestException
-
getAPIListFromStoreAsAnonymousUser
- Parameters:
tenantDomain-- Returns:
- Throws:
ApiException
-
logout
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse logout() throws APIManagerIntegrationTestExceptionAPI Store logout -
signUp
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse signUp(String userName, String password, String firstName, String lastName, String email) throws APIManagerIntegrationTestException API Store sign up- Parameters:
userName- - store user namepassword- -store passwordfirstName- - user first namelastName- - user's last nameemail- - user's email- Returns:
- Throws:
APIManagerIntegrationTestException
-
signUpforTenant
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse signUpforTenant(String userName, String password, String claims) throws APIManagerIntegrationTestException API Store sign up- Parameters:
userName- - store user namepassword- -store passwordclaims- - tenants claims- Returns:
- Throws:
APIManagerIntegrationTestException
-
getPrototypedAPIs
Get Prototyped APIs in Store- Returns:
- HttpResponse - Response with APIs which are deployed as a Prototyped APIs
- Throws:
APIManagerIntegrationTestException
-
generateSDKUpdated
public ApiResponse<byte[]> generateSDKUpdated(String apiId, String language) throws ApiException, IOException Generate SDK for a given programming language- Parameters:
apiId- The api id which the sdk should be downloaded.language- The required sdk language.- Returns:
- org.apache.http.HttpResponse for the SDK generation
- Throws:
APIManagerIntegrationTestException- if failed to generate the SDKApiExceptionIOException
-
generateSDKUpdated
public ApiResponse<byte[]> generateSDKUpdated(String apiId, String language, String tenantDomain) throws ApiException, IOException Generate SDK for a given programming language- Parameters:
apiId- The api id which the sdk should be downloaded.language- The required sdk language.tenantDomain- The tenant domain of the sdk to be generated- Returns:
- org.apache.http.HttpResponse for the SDK generation
- Throws:
APIManagerIntegrationTestException- if failed to generate the SDKApiExceptionIOException
-
changePassword
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse changePassword(String currentPassword, String newPassword) throws ApiException Change password of the user- Parameters:
currentPassword- current password of the usernewPassword- new password of the user- Returns:
- Throws:
ApiException- if failed to change password
-
getSwaggerByID
- Throws:
ApiException
-
generateUserAccessKey
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse generateUserAccessKey(String consumeKey, String consumerSecret, String messageBody, URL tokenEndpointURL) throws APIManagerIntegrationTestException Generate user access key- Parameters:
consumeKey- - consumer key of userconsumerSecret- - consumer secret keymessageBody- - message bodytokenEndpointURL- - token endpoint url- Returns:
- - http response of generate access token api call
- Throws:
APIManagerIntegrationTestException- - throws if generating APIM access token fails
-
downloadWSDLSchemaDefinitionOfAPI
public ApiResponse<Void> downloadWSDLSchemaDefinitionOfAPI(String apiId, String environmentName) throws ApiException - Throws:
ApiException
-
getKeyManagers
- Throws:
ApiException
-
getKeyManagers
- Throws:
ApiException
-
getApplicationKeyByKeyMappingId
public ApplicationKeyDTO getApplicationKeyByKeyMappingId(String applicationId, String keyMappingId) throws ApiException - Throws:
ApiException
-
updateApplicationKeyByKeyMappingId
public ApplicationKeyDTO updateApplicationKeyByKeyMappingId(String applicationId, String keyMappingId, ApplicationKeyDTO applicationKeyDTO) throws ApiException - Throws:
ApiException
-
getApplicationKeysByAppId
- Throws:
ApiException
-
mapConsumerKeyWithApplication
public ApplicationKeyDTO mapConsumerKeyWithApplication(String consumerKey, String consumerSecret, String appid, String keyManager) throws ApiException - 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
-
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
-
getApplicationPolicies
- Throws:
ApiException
-
generateKeys
public ApplicationKeyDTO generateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes, String keyManager) throws ApiException, APIManagerIntegrationTestException -
generateKeysWithHttpInfo
public ApiResponse<ApplicationKeyDTO> generateKeysWithHttpInfo(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes, String keyManager) throws ApiException - Throws:
ApiException
-
getAllMCPServers
public APIListDTO getAllMCPServers(Integer limit, Integer offset, String xWSO2Tenant, String query) throws ApiException - Throws:
ApiException
-
getApplicationOauthKeys
public ApplicationKeyListDTO getApplicationOauthKeys(String applicationUUID, String tenantDomain) throws ApiException - Throws:
ApiException
-
getApplications
- Throws:
ApiException
-
getUserOrganization
- Throws:
ApiException
-