List API Usage Metrics
get/apiusagemetrics
Lists all API usage metrics.
Java
ApiUsageApi.listApiUsageMetrics([param1, param2, ...])
Python
APIUsageApi.list_api_usage_metrics([param1, param2, ...])
JavaScript
APIUsageApi.listApiUsageMetrics([param1, param2, ...])
SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
Responses
200
successful operation
403
Not authorized to view API events.
Request samples
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.ApiUsageApi; import com.trendmicro.deepsecurity.model.APIUsageMetrics; public class ListApiUsageMetricsExample { public static void main(String[] args) { // Setup ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("YOUR HOST"); // Authentication ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } // Initialization // Set Any Required Values ApiUsageApi instance = new ApiUsageApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours APIUsageMetrics result = instance.listApiUsageMetrics(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ApiUsageApi.listApiUsageMetrics"); e.printStackTrace(); } } }
Response samples
- 200
application/json
{- "apiUsageMetrics": [
- {
- "apiType": "string",
- "action": "string",
- "method": "string",
- "date": 0,
- "tenantGUID": "string",
- "duration": 0,
- "statusCode": 0,
- "authenticationMethod": "string",
- "expandParameter": "string",
- "responseItemCount": 0,
- "ID": 0
}
]
}
Search API Usage Metrics
post/apiusagemetrics/search
Search for API usage metrics using optional filters.
Java
ApiUsageApi.searchApiUsageMetrics([param1, param2, ...])
Python
APIUsageApi.search_api_usage_metrics([param1, param2, ...])
JavaScript
APIUsageApi.searchApiUsageMetrics([param1, param2, ...])
SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
header Parameters
Request Body schema: application/json
A collection of options used to filter the search results.
Responses
200
successful operation
403
Not authorized to view API events.
Request samples
- Payload
- Java
- Python
- JavaScript
application/json
{- "maxItems": 0,
- "searchCriteria": [
- {
- "fieldName": "string",
- "booleanTest": true,
- "numericTest": "less-than",
- "numericValue": 0,
- "numericValueList": [
- 0
], - "stringTest": "equal",
- "stringValue": "string",
- "stringWildcards": true,
- "choiceTest": "equal",
- "choiceValue": "string",
- "firstDateValue": 0,
- "firstDateInclusive": true,
- "lastDateValue": 0,
- "lastDateInclusive": true,
- "nullTest": true,
- "versionTest": "less-than",
- "versionValue": "string",
- "idValue": 0,
- "idTest": "less-than",
- "idValueList": [
- 0
]
}
], - "sortByObjectID": true
}
Response samples
- 200
application/json
{- "apiUsageMetrics": [
- {
- "apiType": "string",
- "action": "string",
- "method": "string",
- "date": 0,
- "tenantGUID": "string",
- "duration": 0,
- "statusCode": 0,
- "authenticationMethod": "string",
- "expandParameter": "string",
- "responseItemCount": 0,
- "ID": 0
}
]
}