API Usage

Search API Usage Metrics

post/apiusagemetrics/search

Search for API usage metrics using optional filters.

Related SDK Methods:
Java

ApiUsageApi.searchApiUsageMetrics([param1, param2, ...])

Python

APIUsageApi.search_api_usage_metrics([param1, param2, ...])

JavaScript

APIUsageApi.searchApiUsageMetrics([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

A collection of options used to filter the search results.

maxItems
integer <int32>

Limits the number of objects returned. Default 5000.

Array of objects (searchCriteria)

Array of search critiera used to filter objects. Searching with multiple criteria returns results that satisfy all of the criteria. Searching with no criteria returns all objects.

sortByObjectID
boolean

If true, forces the response objects to be sorted by ID, overriding the default sort order. Default "false".

Responses
200

successful operation

403

Not authorized to view API events.

Request samples
application/json
{
  • "maxItems": 0,
  • "searchCriteria": [
    ],
  • "sortByObjectID": true
}
Response samples
application/json
{
  • "apiUsageMetrics": [
    ]
}

List API Usage Metrics

get/apiusagemetrics

Lists all API usage metrics.

Related SDK Methods:
Java

ApiUsageApi.listApiUsageMetrics([param1, param2, ...])

Python

APIUsageApi.list_api_usage_metrics([param1, param2, ...])

JavaScript

APIUsageApi.listApiUsageMetrics([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to view API events.

Request samples
import com.trendmicro.deepsecurity.ApiClient;
import com.trendmicro.deepsecurity.Configuration;
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 DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication");
		DefaultAuthentication.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
application/json
{
  • "apiUsageMetrics": [
    ]
}