Class RestAPIStoreImpl
- java.lang.Object
-
- org.wso2.am.integration.test.impl.RestAPIStoreImpl
-
public class RestAPIStoreImpl extends Object
This util class performs the actions related to APIDTOobjects.
-
-
Field Summary
Fields Modifier and Type Field Description ApiKeysApiapiKeysApiApIsApiapIsApiApplicationKeysApiapplicationKeysApiApplicationsApiapplicationsApistatic StringappNamestatic StringappOwnerstatic StringcallBackURLCommentsApicommentsApistatic StringgrantTypeGraphQlPoliciesApigraphQlPoliciesApiKeyManagersCollectionApikeyManagersCollectionApistatic StringpasswordRatingsApiratingsApiSdKsApisdKsApiStringstoreURLSubscriptionsApisubscriptionIndividualApiTagsApitagsApiStringtenantDomainstatic StringtestNamePropertyThrottlingPoliciesApithrottlingPoliciesApistatic StringtokenScopeTopicsApitopicsApiUnifiedSearchApiunifiedSearchApistatic StringusernameUsersApiusersApiWebhooksApiwebhooksApi
-
Constructor Summary
Constructors Constructor Description RestAPIStoreImpl(String tenantDomain, String storeURL)RestAPIStoreImpl(String username, String password, String tenantDomain, String storeURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationDTOaddApplication(String application, String tier, String callbackUrl, String description)Add applicationApplicationDTOaddApplicationWithTokenType(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.HttpResponseaddRating(String apiId, Integer rating, String tenantDomain)Add rating into apiApiResponse<ApplicationDTO>applicationsPostWithHttpInfo(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)ApiResponse<ApplicationDTO>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.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)ApiResponse<Void>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 APIAPIKeyDTOgenerateAPIKeys(String applicationId, String keyType, int validityPeriod, String permittedIP, String permittedReferer)ApplicationKeyDTOgenerateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes)ApplicationKeyDTOgenerateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, ArrayList<String> scopes, List<String> grantTypes, String keyManager)ApplicationKeyDTOgenerateKeys(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String,Object> additionalProperties, String keyManager)ApplicationKeyDTOgenerateKeysWithAdditionalProperties(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String,Object> additionalProperties)ApiResponse<ApplicationKeyDTO>generateKeysWithApiResponse(String applicationId, String validityTime, String callBackUrl, ApplicationKeyGenerateRequestDTO.KeyTypeEnum keyTypeEnum, List<String> scopes, List<String> grantTypes, Map<String,Object> additionalProperties, String keyManager)ApiResponse<ApplicationKeyDTO>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 keyStringgetAccessToken()APIListDTOgetAllAPIs()APIListDTOgetAllAPIs(String tenantDomain)ApplicationListDTOgetAllApps()org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllDocumentationOfAPI(String apiName, String version, String provider)Method to retrieve all documents of given apiorg.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 tenantAPIListDTOgetAllPublishedAPIs()Get all published apisorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetAllPublishedAPIs(String tenant)Get all published APIs for tenantSubscriptionListDTOgetAllSubscriptionsOfApplication(String applicationId)Get All subscriptions for an application.SubscriptionListDTOgetAllSubscriptionsOfApplication(String applicationId, String tenantDomain)Get All subscriptions for an application.TagListDTOgetAllTags()Get all API tagsAPIDTOgetAPI(String apiId)Get api which are publishedAPIDTOgetAPI(String apiId, String tenantDomain)Get api which are publishedorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApiEndpointUrls(String apiName, String version, String provider)Method to retrieve all endpoint urlsAPIListDTOgetAPIListFromStoreAsAnonymousUser(String tenantDomain)APIListDTOgetAPIs(int offset, int limit)Get APIs for the given limit and offset valuesAPIListDTOgetAPIsFilteredWithTags(String apiTag)Get the web page with filtered API when click the API Tag linkApplicationDTOgetApplicationById(String applicationId)Get application by IDApplicationDTOgetApplicationById(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 detailsApplicationKeyDTOgetApplicationKeyByKeyMappingId(String applicationId, String keyMappingId)ApplicationKeyListDTOgetApplicationKeysByAppId(String jwtAppId)ApiResponse<ApplicationKeyDTO>getApplicationKeysByKeyType(String applicationId, String keyType)Regenerate consumer secret of an applicationApplicationKeyListDTOgetApplicationOauthKeys(String applicationUUID, String tenantDomain)ThrottlingPolicyListDTOgetApplicationPolicies(String tenantDomain)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetApplications()Get applicationApplicationListDTOgetApplications(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.HttpResponsegetGraphQLComplexityResponse(String apiId)Method to retrieve the GraphQL Complexity Detailsorg.wso2.carbon.automation.test.utils.http.client.HttpResponsegetGraphQLSchemaTypeListResponse(String apiId)Method to retrieve the GraphQL Schema Type ListKeyManagerListDTOgetKeyManagers()KeyManagerListDTOgetKeyManagers(String tenantDomain)APIListDTOgetPrototypedAPIs(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 ApplicationSubscriptionListDTOgetSubscription(String apiId, String applicationId, String apiType, String groupId)StringgetSwaggerByID(String apiId, String tenantDomain)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetTopics(String apiId, String tenantDomain)org.wso2.carbon.automation.test.utils.http.client.HttpResponsegetWebhooks(String apiId, String applicationId, String tenantDomain)org.wso2.carbon.automation.test.utils.http.client.HttpResponseisCommentActivated()Check whether commenting is enabledorg.wso2.carbon.automation.test.utils.http.client.HttpResponseisRatingActivated()Check if API rating activatedorg.wso2.carbon.automation.test.utils.http.client.HttpResponselogout()API Store logoutApplicationKeyDTOmapConsumerKeyWithApplication(String consumerKey, String consumerSecret, String appid, String keyManager)org.wso2.carbon.automation.test.utils.http.client.HttpResponseregenerateConsumerSecret(String clientId)Regenerate consumer secret.ApiResponse<ApplicationKeyReGenerateResponseDTO>regenerateConsumerSecret(String applicationId, String keyType)Regenerate consumer secret of an applicationApplicationKeyReGenerateResponseDTOregenerateSecretByKeyMappingId(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)voidrevokeAPIKey(String applicationId, String apiKey)SearchResultListDTOsearchAPIs(String query)Retrieve the APIs according to the search query in Publisher.SearchResultListDTOsearchAPIs(String query, String tenantDomain)Retrieve the APIs according to the search query in Publisher.APIListDTOsearchPaginatedAPIs(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.HttpResponsesignUp(String userName, String password, String firstName, String lastName, String email)API Store sign uporg.wso2.carbon.automation.test.utils.http.client.HttpResponsesignUpforTenant(String userName, String password, String claims)API Store sign upSubscriptionDTOsubscribeToAPI(String apiID, String appID, String tier)SubscriptionDTOsubscribeToAPI(String apiID, String appID, String tier, String tenantDomain)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, 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 organizationApplicationKeyDTOupdateApplicationKeyByKeyMappingId(String applicationId, String keyMappingId, ApplicationKeyDTO applicationKeyDTO)org.wso2.carbon.automation.test.utils.http.client.HttpResponseupdateClientApplicationById(String applicationId, ApplicationDTO applicationDTO)Update given Auth applicationApiResponse<ApplicationKeyDTO>updateKeys(String applicationId, String keyType, ApplicationKeyDTO applicationKeyDTO)Regenerate consumer secret of an application
-
-
-
Field Detail
-
appName
public static final String appName
- See Also:
- Constant Field Values
-
callBackURL
public static final String callBackURL
- See Also:
- Constant Field Values
-
tokenScope
public static final String tokenScope
- See Also:
- Constant Field Values
-
appOwner
public static final String appOwner
- See Also:
- Constant Field Values
-
grantType
public static final String grantType
- See Also:
- Constant Field Values
-
username
public static final String username
- See Also:
- Constant Field Values
-
password
public static final String password
- See Also:
- Constant Field Values
-
testNameProperty
public static final String testNameProperty
- See Also:
- Constant Field Values
-
apIsApi
public ApIsApi apIsApi
-
applicationsApi
public ApplicationsApi applicationsApi
-
subscriptionIndividualApi
public SubscriptionsApi subscriptionIndividualApi
-
applicationKeysApi
public ApplicationKeysApi applicationKeysApi
-
commentsApi
public CommentsApi commentsApi
-
ratingsApi
public RatingsApi ratingsApi
-
tagsApi
public TagsApi tagsApi
-
sdKsApi
public SdKsApi sdKsApi
-
apiKeysApi
public ApiKeysApi apiKeysApi
-
unifiedSearchApi
public UnifiedSearchApi unifiedSearchApi
-
keyManagersCollectionApi
public KeyManagersCollectionApi keyManagersCollectionApi
-
graphQlPoliciesApi
public GraphQlPoliciesApi graphQlPoliciesApi
-
throttlingPoliciesApi
public ThrottlingPoliciesApi throttlingPoliciesApi
-
usersApi
public UsersApi usersApi
-
topicsApi
public TopicsApi topicsApi
-
webhooksApi
public WebhooksApi webhooksApi
-
storeURL
public String storeURL
-
tenantDomain
public String tenantDomain
-
-
Method Detail
-
getAccessToken
public String getAccessToken()
-
setAccessToken
public void setAccessToken(String accessToken)
-
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
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse createApplicationWithOrganization(String appName, String description, String throttleTier, ApplicationDTO.TokenTypeEnum tokenType, List<String> groups)
-
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
public ApplicationListDTO getAllApps() throws ApiException
- 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
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
-
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) throws ApiException
- Throws:
ApiException
-
revokeAPIKey
public void revokeAPIKey(String applicationId, String apiKey) 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
public APIDTO getAPI(String apiId) throws ApiException
Get api which are published- Returns:
- - http response of get API post request
- Throws:
ApiException- - throws if API information retrieval fails.
-
getAPI
public APIDTO getAPI(String apiId, String tenantDomain) throws ApiException
Get api which are published- Returns:
- - http response of get API post request
- Throws:
ApiException- - throws if API information retrieval fails.
-
getAllPublishedAPIs
public APIListDTO getAllPublishedAPIs() throws APIManagerIntegrationTestException
Get all published apis- Returns:
- - http response of get all published apis
- Throws:
APIManagerIntegrationTestException- - throws if getting publish APIs fails
-
getAllAPIs
public APIListDTO getAllAPIs() throws ApiException
- Returns:
- Throws:
ApiException
-
getAllAPIs
public APIListDTO getAllAPIs(String tenantDomain) throws ApiException
- Returns:
- Throws:
ApiException
-
searchAPIs
public SearchResultListDTO searchAPIs(String query) throws ApiException
Retrieve the APIs according to the search query in Publisher.- Parameters:
query- - The query on which the APIs needs to be filtered- Returns:
- SearchResultListDTO - The search results of the query
- Throws:
ApiException
-
searchAPIs
public SearchResultListDTO searchAPIs(String query, String tenantDomain) throws ApiException
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
public APIListDTO getAPIs(int offset, int limit) throws ApiException
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
-
getApplicationById
public ApplicationDTO getApplicationById(String applicationId) throws ApiException
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
public void removeApplicationById(String applicationId) throws ApiException
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
-
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 APIManagerIntegrationTestExceptionUpdate 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
public TagListDTO getAllTags() throws ApiException
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
public org.wso2.carbon.automation.test.utils.http.client.HttpResponse getTopics(String apiId, String tenantDomain)
-
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
-
getAPIListFromStoreAsAnonymousUser
public APIListDTO getAPIListFromStoreAsAnonymousUser(String tenantDomain) throws ApiException
- 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
public APIListDTO getPrototypedAPIs(String tenant) throws APIManagerIntegrationTestException
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
public String getSwaggerByID(String apiId, String tenantDomain) throws ApiException
- 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
public KeyManagerListDTO getKeyManagers() throws ApiException
- Throws:
ApiException
-
getKeyManagers
public KeyManagerListDTO getKeyManagers(String tenantDomain) throws ApiException
- 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
public ApplicationKeyListDTO getApplicationKeysByAppId(String jwtAppId) throws ApiException
- 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
public ThrottlingPolicyListDTO getApplicationPolicies(String tenantDomain) throws ApiException
- 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
-
getApplicationOauthKeys
public ApplicationKeyListDTO getApplicationOauthKeys(String applicationUUID, String tenantDomain) throws ApiException
- Throws:
ApiException
-
getApplications
public ApplicationListDTO getApplications(String applicationName) throws ApiException
- Throws:
ApiException
-
-