API Keys

Describe the Current API Key

get/apikeys/current

Describe the API key that is associated with the credentials that are being used to authenticate this call. Authentication must be done via an API secret key.

Related SDK Methods:
Java

ApiKeysApi.describeCurrentApiKey([param1, param2, ...])

Python

APIKeysApi.describe_current_api_key([param1, param2, ...])

JavaScript

APIKeysApi.describeCurrentApiKey([param1, param2, ...])

SecurityLegacy_API_Key
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 keys.

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.ApiKeysApi;
import com.trendmicro.deepsecurity.model.ApiKeyCurrent;


public class DescribeCurrentApiKeyExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApiKeyCurrent result = instance.describeCurrentApiKey(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.describeCurrentApiKey");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "roleURN": "string",
  • "tenantID": 0,
  • "tenantGUID": "string",
  • "cloudOneAccountID": "string",
  • "ID": 0
}

Modify the Current API Key

post/apikeys/current

Modify the API key that is associated with the credentials that are being used to authenticate this call. Authentication must be done via an API secret key. Writable fields are: keyName, description, locale, & timeZone. Any unset elements will be left unchanged. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.modifyCurrentApiKey([param1, param2, ...])

Python

APIKeysApi.modify_current_api_key([param1, param2, ...])

JavaScript

APIKeysApi.modifyCurrentApiKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The settings of the API key to modify.

active
boolean

If true, the APIKey can be used to authenticate. If false, the APIKey is locked out. Searchable as Boolean.

created
integer <int64>

Timestamp of the APIKey's creation, in milliseconds since epoch. Searchable as Date.

description
string

Description of the APIKey. Searchable as String.

expiryDate
integer <int64>

Timestamp of the APIKey's expiry date, in milliseconds since epoch. Searchable as Date.

keyName
string

Display name of the APIKey. Searchable as String.

lastSignIn
integer <int64>

Timestamp of the APIKey's last successful authentication, in milliseconds since epoch. Searchable as Date.

locale
string

Country and language for the APIKey.

Enum: "en-US" "ja-JP"
roleID
integer <int32>

ID of the role assigned to the APIKey. Searchable as Numeric.

timeZone
string

Display name of the APIKey's time zone, e.g. America/New_York. Searchable as String.

unlockTime
integer <int64>

Timestamp of when a locked out APIKey will be unlocked, in milliseconds since epoch. Searchable as Date.

unsuccessfulSignInAttempts
integer <int32>

Number of unsuccessful authentication attempts made since the last successful authentication. Searchable as Numeric.

Responses
200

successful operation

403

Not authorized to modify API keys or the requested modification is not permitted.

404

The API key does not exist.

Request samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0
}
Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "roleURN": "string",
  • "tenantID": 0,
  • "tenantGUID": "string",
  • "cloudOneAccountID": "string",
  • "ID": 0
}

Generate a Secret Key for the Current API Key

post/apikeys/current/secretkey

Generate a new secret key for the current API key. Authentication must be done via an API secret key. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.replaceCurrentApiSecretKey([param1, param2, ...])

Python

APIKeysApi.replace_current_api_secret_key([param1, param2, ...])

JavaScript

APIKeysApi.replaceCurrentApiSecretKey([param1, param2, ...])

SecurityLegacy_API_Key
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 modify API keys and generate a new Secret Key or the requested modification is not permitted.

404

The API key does not exist.

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.ApiKeysApi;
import com.trendmicro.deepsecurity.model.ApiKey;


public class ReplaceCurrentApiSecretKeyExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApiKey result = instance.replaceCurrentApiSecretKey(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.replaceCurrentApiSecretKey");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}

Generate an API Secret Key

post/apikeys/{apiKeyID}/secretkey

Generate a new API secret key. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.replaceApiSecretKey([param1, param2, ...])

Python

APIKeysApi.replace_api_secret_key([param1, param2, ...])

JavaScript

APIKeysApi.replaceApiSecretKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
path Parameters
apiKeyID
required
integer <int32> \d+

The ID number of API key used to generate the secret key.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to generate API secret keys.

404

The API key does not exist.

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.ApiKeysApi;
import com.trendmicro.deepsecurity.model.ApiKey;


public class ReplaceApiSecretKeyExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		Integer apiKeyID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApiKey result = instance.replaceApiSecretKey(apiKeyID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.replaceApiSecretKey");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}

Describe an API Key

get/apikeys/{apiKeyID}

Describe an API key by ID. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.describeApiKey([param1, param2, ...])

Python

APIKeysApi.describe_api_key([param1, param2, ...])

JavaScript

APIKeysApi.describeApiKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
path Parameters
apiKeyID
required
integer <int32> \d+

The ID number of the API key to describe.

Example: 1
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 keys.

404

The API key does not exist.

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.ApiKeysApi;
import com.trendmicro.deepsecurity.model.ApiKey;


public class DescribeApiKeyExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		Integer apiKeyID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApiKey result = instance.describeApiKey(apiKeyID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.describeApiKey");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}

Modify an API Key

post/apikeys/{apiKeyID}

Modify an API key by ID. Any unset elements will be left unchanged. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.modifyApiKey([param1, param2, ...])

Python

APIKeysApi.modify_api_key([param1, param2, ...])

JavaScript

APIKeysApi.modifyApiKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
path Parameters
apiKeyID
required
integer <int32> \d+

The ID number of the API key to modify.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The settings of the API key to modify.

active
boolean

If true, the APIKey can be used to authenticate. If false, the APIKey is locked out. Searchable as Boolean.

created
integer <int64>

Timestamp of the APIKey's creation, in milliseconds since epoch. Searchable as Date.

description
string

Description of the APIKey. Searchable as String.

expiryDate
integer <int64>

Timestamp of the APIKey's expiry date, in milliseconds since epoch. Searchable as Date.

keyName
string

Display name of the APIKey. Searchable as String.

lastSignIn
integer <int64>

Timestamp of the APIKey's last successful authentication, in milliseconds since epoch. Searchable as Date.

locale
string

Country and language for the APIKey.

Enum: "en-US" "ja-JP"
roleID
integer <int32>

ID of the role assigned to the APIKey. Searchable as Numeric.

timeZone
string

Display name of the APIKey's time zone, e.g. America/New_York. Searchable as String.

unlockTime
integer <int64>

Timestamp of when a locked out APIKey will be unlocked, in milliseconds since epoch. Searchable as Date.

unsuccessfulSignInAttempts
integer <int32>

Number of unsuccessful authentication attempts made since the last successful authentication. Searchable as Numeric.

Responses
200

successful operation

403

Not authorized to modify API keys or the requested modification is not permitted.

404

The API key does not exist.

Request samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0
}
Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}

Delete an API Key

delete/apikeys/{apiKeyID}

Delete an API key by ID. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.deleteApiKey([param1, param2, ...])

Python

APIKeysApi.delete_api_key([param1, param2, ...])

JavaScript

APIKeysApi.deleteApiKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
path Parameters
apiKeyID
required
integer <int32> \d+

The ID number of the API key to delete.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

Request is successful.

403

Not authorized to delete API keys.

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.ApiKeysApi;


public class DeleteApiKeyExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		Integer apiKeyID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			instance.deleteApiKey(apiKeyID, apiVersion);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.deleteApiKey");
			e.printStackTrace();
		}
	}
}

List API Keys

get/apikeys

Lists all API keys. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.listApiKeys([param1, param2, ...])

Python

APIKeysApi.list_api_keys([param1, param2, ...])

JavaScript

APIKeysApi.listApiKeys([param1, param2, ...])

SecurityLegacy_API_Key
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 keys.

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.ApiKeysApi;
import com.trendmicro.deepsecurity.model.ApiKeys;


public class ListApiKeysExample {
	
	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();
		}
		
		// Initialization
		// Set Any Required Values
		ApiKeysApi instance = new ApiKeysApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApiKeys result = instance.listApiKeys(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ApiKeysApi.listApiKeys");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "apiKeys": [
    ]
}

Create an API Key

post/apikeys

Create a new API key. This method works only for Legacy API Key. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.createApiKey([param1, param2, ...])

Python

APIKeysApi.create_api_key([param1, param2, ...])

JavaScript

APIKeysApi.createApiKey([param1, param2, ...])

SecurityLegacy_API_Key
Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The settings of the new API key.

active
boolean

If true, the APIKey can be used to authenticate. If false, the APIKey is locked out. Searchable as Boolean.

created
integer <int64>

Timestamp of the APIKey's creation, in milliseconds since epoch. Searchable as Date.

description
string

Description of the APIKey. Searchable as String.

expiryDate
integer <int64>

Timestamp of the APIKey's expiry date, in milliseconds since epoch. Searchable as Date.

keyName
string

Display name of the APIKey. Searchable as String.

lastSignIn
integer <int64>

Timestamp of the APIKey's last successful authentication, in milliseconds since epoch. Searchable as Date.

locale
string

Country and language for the APIKey.

Enum: "en-US" "ja-JP"
roleID
integer <int32>

ID of the role assigned to the APIKey. Searchable as Numeric.

timeZone
string

Display name of the APIKey's time zone, e.g. America/New_York. Searchable as String.

unlockTime
integer <int64>

Timestamp of when a locked out APIKey will be unlocked, in milliseconds since epoch. Searchable as Date.

unsuccessfulSignInAttempts
integer <int32>

Number of unsuccessful authentication attempts made since the last successful authentication. Searchable as Numeric.

Responses
200

successful operation

403

Not authorized to create API keys.

Request samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0
}
Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}

Search API Keys

post/apikeys/search

Search for API keys using optional filters. For managing the CloudOne API Key, see the CloudOne API KEY Reference.

Related SDK Methods:
Java

ApiKeysApi.searchApiKeys([param1, param2, ...])

Python

APIKeysApi.search_api_keys([param1, param2, ...])

JavaScript

APIKeysApi.searchApiKeys([param1, param2, ...])

SecurityLegacy_API_Key
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 keys.

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