Search in sources :

Example 16 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method deleteApi.

public boolean deleteApi(String apiProviderName, String apiName, String version) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    // Delete secure vault alias properties if exists
    deleteRegistryProperty(apiProviderName, apiName, version, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    return restClient.deleteApi(qualifiedName);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Example 17 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method getDefaultApiForTenant.

public org.wso2.carbon.apimgt.gateway.dto.APIData getDefaultApiForTenant(String apiName, String version, String tenantDomain) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain);
    String qualifiedName = GatewayUtils.getQualifiedDefaultApiName(apiName);
    APIData apiData = restClient.getApi(qualifiedName);
    return convert(apiData);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy) APIData(org.wso2.carbon.rest.api.APIData)

Example 18 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method getApiForTenant.

/**
 * Get API from the gateway
 *
 * @param tenantDomain
 * @return
 * @throws AxisFault
 */
public org.wso2.carbon.apimgt.gateway.dto.APIData getApiForTenant(String apiName, String version, String tenantDomain) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    APIData apiData = restClient.getApi(qualifiedName);
    return convert(apiData);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy) APIData(org.wso2.carbon.rest.api.APIData)

Example 19 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method updateDefaultApiForTenant.

public boolean updateDefaultApiForTenant(String apiName, String version, String apiConfig, String tenantDomain) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain);
    String qualifiedName = GatewayUtils.getQualifiedDefaultApiName(apiName);
    return restClient.updateApi(qualifiedName, apiConfig);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Example 20 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method updateApiForInlineScriptForTenant.

/**
 * Update the API in the Gateway
 *
 * @param tenantDomain
 * @throws AxisFault
 */
public boolean updateApiForInlineScriptForTenant(String apiName, String version, String apiConfig, String tenantDomain) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    return restClient.updateApi(qualifiedName, apiConfig);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Aggregations

RESTAPIAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)44 Test (org.junit.Test)28 EndpointAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy)10 SequenceAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.SequenceAdminServiceProxy)10 APIData (org.wso2.carbon.rest.api.APIData)8 OMElement (org.apache.axiom.om.OMElement)5 AxisFault (org.apache.axis2.AxisFault)3 APIManagementException (org.wso2.carbon.apimgt.api.APIManagementException)3 OMFactory (org.apache.axiom.om.OMFactory)2 LocalEntryServiceProxy (org.wso2.carbon.apimgt.gateway.utils.LocalEntryServiceProxy)2 MediationSecurityAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.MediationSecurityAdminServiceProxy)2 CertificateManager (org.wso2.carbon.apimgt.impl.certificatemgt.CertificateManager)2 XMLStreamException (javax.xml.stream.XMLStreamException)1 CredentialDto (org.wso2.carbon.apimgt.api.gateway.CredentialDto)1 GatewayContentDTO (org.wso2.carbon.apimgt.api.gateway.GatewayContentDTO)1 ResourceData (org.wso2.carbon.rest.api.ResourceData)1