public class APIUsageStatisticsClient extends Object
| Constructor and Description |
|---|
APIUsageStatisticsClient(String username) |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.axiom.om.OMElement |
buildOMElement(InputStream inputStream) |
Map<String,Object> |
evaluate(String param,
int calls) |
List<APIResponseFaultCountDTO> |
getAPIFaultyAnalyzeByTime(String providerName) |
List<APIResponseFaultCountDTO> |
getAPIResponseFaultCount(String providerName,
String fromDate,
String toDate) |
List<APIPageUsageDTO> |
getAPIUsageByPage(String providerName,
String fromDate,
String toDate,
String tenantDomainName) |
List<APIResourcePathUsageDTO> |
getAPIUsageByResourcePath(String providerName,
String fromDate,
String toDate)
Returns a list of APIVersionUsageDTO objects that contain information related to a
particular WebApp of a specified provider, along with the number of WebApp calls processed
by each resource path of that WebApp.
|
List<APIUsageByUserDTO> |
getAPIUsageByUser(String providerName,
String fromDate,
String toDate,
String tenantDomainName)
Returns a list of APIUsageByUserDTO objects that contain information related to
User wise WebApp Usage, along with the number of invocations, and WebApp Version
|
List<APPMCacheCountDTO> |
getCacheHitCount(String providerName,
String fromDate,
String toDate) |
List<String> |
getFirstAccessTime(String providerName,
int limit) |
List<APIVersionLastAccessTimeDTO> |
getLastAccessTimesByAPI(String providerName,
String fromDate,
String toDate,
int limit,
String tenantDomainName)
Returns a list of APIVersionLastAccessTimeDTO objects for all the APIs belonging to the
specified provider.
|
List<APIResponseTimeDTO> |
getResponseTimesByAPIs(String providerName,
String fromDate,
String toDate,
int limit,
String tenantDomain)
Gets a list of APIResponseTimeDTO objects containing information related to APIs belonging
to a particular provider along with their average response times.
|
List<APIUsageDTO> |
getUsageByAPIs(String providerName,
String fromDate,
String toDate,
int limit,
String tenantDomainName)
Returns a list of APIUsageDTO objects that contain information related to APIs that
belong to a particular provider and the number of total WebApp calls each WebApp has processed
up to now.
|
List<APIVersionUsageDTO> |
getUsageByAPIVersions(String providerName,
String apiName)
Returns a list of APIVersionUsageDTO objects that contain information related to a
particular WebApp of a specified provider, along with the number of WebApp calls processed
by each version of that WebApp.
|
List<APIVersionUsageDTO> |
getUsageByAPIVersions(String providerName,
String apiName,
String fromDate,
String toDate)
Returns a list of APIVersionUsageDTO objects that contain information related to a
particular WebApp of a specified provider, along with the number of WebApp calls processed
by each version of that WebApp for a particular time preriod.
|
List<APIVersionUserUsageDTO> |
getUsageBySubscriber(String subscriberName,
String period) |
List<PerUserAPIUsageDTO> |
getUsageBySubscribers(String providerName,
String apiName,
int limit)
Returns a sorted list of PerUserAPIUsageDTO objects related to a particular WebApp.
|
List<PerUserAPIUsageDTO> |
getUsageBySubscribers(String providerName,
String apiName,
String apiVersion,
int limit) |
static void |
initializeDataSource() |
boolean |
isTableExist(String tableName,
Connection connection) |
public APIUsageStatisticsClient(String username) throws APIMgtUsageQueryServiceClientException
public static void initializeDataSource()
throws APIMgtUsageQueryServiceClientException
public List<APIUsageDTO> getUsageByAPIs(String providerName, String fromDate, String toDate, int limit, String tenantDomainName) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerAPIMgtUsageQueryServiceClientException - if an error occurs while contacting backend servicespublic List<APIVersionUsageDTO> getUsageByAPIVersions(String providerName, String apiName) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerapiName - Name of th WebAppAPIMgtUsageQueryServiceClientException - on errorpublic List<APIVersionUsageDTO> getUsageByAPIVersions(String providerName, String apiName, String fromDate, String toDate) throws APIMgtUsageQueryServiceClientException
providerName - apiName - fromDate - toDate - APIMgtUsageQueryServiceClientExceptionpublic List<APIResourcePathUsageDTO> getAPIUsageByResourcePath(String providerName, String fromDate, String toDate) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerAPIMgtUsageQueryServiceClientException - on errorpublic List<APIPageUsageDTO> getAPIUsageByPage(String providerName, String fromDate, String toDate, String tenantDomainName) throws APIMgtUsageQueryServiceClientException
public List<APIUsageByUserDTO> getAPIUsageByUser(String providerName, String fromDate, String toDate, String tenantDomainName) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerAPIMgtUsageQueryServiceClientException - on errorpublic List<APPMCacheCountDTO> getCacheHitCount(String providerName, String fromDate, String toDate) throws APIMgtUsageQueryServiceClientException, SQLException, XMLStreamException
public List<APIResponseTimeDTO> getResponseTimesByAPIs(String providerName, String fromDate, String toDate, int limit, String tenantDomain) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerAPIMgtUsageQueryServiceClientException - on errorpublic List<APIVersionLastAccessTimeDTO> getLastAccessTimesByAPI(String providerName, String fromDate, String toDate, int limit, String tenantDomainName) throws APIMgtUsageQueryServiceClientException
providerName - Name of the WebApp providerAPIMgtUsageQueryServiceClientException - on errorpublic List<PerUserAPIUsageDTO> getUsageBySubscribers(String providerName, String apiName, int limit) throws APIMgtUsageQueryServiceClientException
providerName - WebApp provider nameapiName - Name of the WebApplimit - Number of sorted entries to returnAPIMgtUsageQueryServiceClientException - on errorpublic List<APIResponseFaultCountDTO> getAPIResponseFaultCount(String providerName, String fromDate, String toDate) throws APIMgtUsageQueryServiceClientException
public List<APIResponseFaultCountDTO> getAPIFaultyAnalyzeByTime(String providerName) throws APIMgtUsageQueryServiceClientException
public List<PerUserAPIUsageDTO> getUsageBySubscribers(String providerName, String apiName, String apiVersion, int limit) throws APIMgtUsageQueryServiceClientException
public List<APIVersionUserUsageDTO> getUsageBySubscriber(String subscriberName, String period) throws Exception, org.wso2.carbon.appmgt.api.AppManagementException
Exceptionorg.wso2.carbon.appmgt.api.AppManagementExceptionpublic boolean isTableExist(String tableName, Connection connection) throws SQLException
SQLExceptionpublic static org.apache.axiom.om.OMElement buildOMElement(InputStream inputStream) throws Exception
Exceptionpublic Map<String,Object> evaluate(String param, int calls) throws Exception
Exceptionpublic List<String> getFirstAccessTime(String providerName, int limit) throws APIMgtUsageQueryServiceClientException
Copyright © 2016 WSO2. All rights reserved.