public class RestApiAdminService extends Object
Constructor and Description |
---|
RestApiAdminService() |
Modifier and Type | Method and Description |
---|---|
boolean |
addApi(APIData apiData)
Adds an API with the metadata passed in.
|
boolean |
addApiForTenant(APIData apiData,
String tenantDomain)
Adds an API with the metadata passed in.
|
boolean |
addApiForTenant(String apiData,
String tenantDomain)
Sets the tenant domain when a publisher publishes his API in MT mode.
|
boolean |
addApiFromString(String apiData)
Adds an API with the configuration passed in, as a string.
|
boolean |
deleteApi(String apiName)
Deletes an API that carries the name that is passed in.
|
boolean |
deleteApiForTenant(String apiName,
String tenantDomain)
Deletes an API that exists in the space of a given tenant, carrying the name passed in.
|
APIData |
getApiByName(String apiName)
Retrieves API configuration mapped into the name passed in.
|
APIData |
getApiForTenant(String apiName,
String tenantDomain)
Sets the tenant domain when a publisher tries to retrieve API his API in MT mode.
|
protected Lock |
getLock() |
boolean |
updateApiForTenant(String apiName,
String apiData,
String tenantDomain)
Set the tenant domain when a publisher updates his API in MT mode.
|
boolean |
updateApiFromString(String apiName,
String apiData)
Updates a given API configuration passed in as a string.
|
public boolean addApi(APIData apiData) throws APIException
apiData
- Object model of the API to be addedAPIException
- Is thrown if an anomaly is encountered while adding the given APIpublic boolean addApiForTenant(APIData apiData, String tenantDomain) throws APIException
apiData
- Object model of the API to be addedtenantDomain
- Domain name of the tenant to which the API should be addedAPIException
- Is thrown if an anomaly is encountered while adding the given APIpublic boolean addApiFromString(String apiData) throws APIException
apiData
- API configuration to be added, as a stringAPIException
- Is thrown if an anomaly is encountered while adding the given APIpublic boolean addApiForTenant(String apiData, String tenantDomain) throws APIException
apiData
- API configuration as a stringtenantDomain
- Target tenant domainAPIException
public APIData getApiForTenant(String apiName, String tenantDomain) throws APIException
apiName
- Name of the API to be retrievedtenantDomain
- Target tenant domainAPIException
public APIData getApiByName(String apiName) throws APIException
apiName
- Name of the API to be retrievedAPIException
- Is thrown if an error encountered while retrieving the synapse configurationpublic boolean updateApiFromString(String apiName, String apiData) throws APIException
apiName
- Name of the API to be updatedapiData
- API configuration to be updated, as a stringAPIException
- Is thrown if an anomaly is encountered while updating the given APIpublic boolean updateApiForTenant(String apiName, String apiData, String tenantDomain) throws APIException
apiName
- Name of the APIapiData
- API configuration to be updated as a stringAPIException
public boolean deleteApi(String apiName) throws APIException
apiName
- Name of the API to be deletedAPIException
- Is thrown if an anomaly is encountered while deleting the given APIpublic boolean deleteApiForTenant(String apiName, String tenantDomain) throws APIException
apiName
- Name of the API to be deletedtenantDomain
- Domain name of the tenant which the API belongs toAPIException
- Is thrown if an anomaly is encountered while deleting the given APIprotected Lock getLock() throws APIException
APIException
Copyright © 2022 WSO2. All rights reserved.