Generate an API Secret Key
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.
ApiKeysApi.replaceApiSecretKey([param1, param2, ...])
APIKeysApi.replace_api_secret_key([param1, param2, ...])
APIKeysApi.replaceApiSecretKey([param1, param2, ...])
successful operation
Not authorized to generate API secret keys.
The API key does not exist.
- Java
- Python
- JavaScript
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(); } } }
- 200
{- "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 the Current API Key
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.
ApiKeysApi.describeCurrentApiKey([param1, param2, ...])
APIKeysApi.describe_current_api_key([param1, param2, ...])
APIKeysApi.describeCurrentApiKey([param1, param2, ...])
successful operation
Not authorized to view API keys.
- Java
- Python
- JavaScript
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(); } } }
- 200
{- "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
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.
ApiKeysApi.modifyCurrentApiKey([param1, param2, ...])
APIKeysApi.modify_current_api_key([param1, param2, ...])
APIKeysApi.modifyCurrentApiKey([param1, param2, ...])
header Parameters
Request Body schema: application/json
The settings of the API key to modify.
successful operation
Not authorized to modify API keys or the requested modification is not permitted.
The API key does not exist.
- Payload
- Java
- Python
- JavaScript
{- "keyName": "string",
- "description": "string",
- "locale": "en-US",
- "roleID": 0,
- "timeZone": "string",
- "active": true,
- "created": 0,
- "lastSignIn": 0,
- "unlockTime": 0,
- "unsuccessfulSignInAttempts": 0,
- "expiryDate": 0
}
- 200
{- "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
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.
ApiKeysApi.replaceCurrentApiSecretKey([param1, param2, ...])
APIKeysApi.replace_current_api_secret_key([param1, param2, ...])
APIKeysApi.replaceCurrentApiSecretKey([param1, param2, ...])
successful operation
Not authorized to modify API keys and generate a new Secret Key or the requested modification is not permitted.
The API key does not exist.
- Java
- Python
- JavaScript
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(); } } }
- 200
{- "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
}
List API Keys
Lists all API keys. For managing the CloudOne API Key, see the CloudOne API KEY Reference.
ApiKeysApi.listApiKeys([param1, param2, ...])
APIKeysApi.list_api_keys([param1, param2, ...])
APIKeysApi.listApiKeys([param1, param2, ...])
successful operation
Not authorized to view API keys.
- Java
- Python
- JavaScript
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(); } } }
- 200
{- "apiKeys": [
- {
- "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
}
]
}
Create an API Key
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.
ApiKeysApi.createApiKey([param1, param2, ...])
APIKeysApi.create_api_key([param1, param2, ...])
APIKeysApi.createApiKey([param1, param2, ...])
header Parameters
Request Body schema: application/json
The settings of the new API key.
successful operation
Not authorized to create API keys.
- Payload
- Java
- Python
- JavaScript
{- "keyName": "string",
- "description": "string",
- "locale": "en-US",
- "roleID": 0,
- "timeZone": "string",
- "active": true,
- "created": 0,
- "lastSignIn": 0,
- "unlockTime": 0,
- "unsuccessfulSignInAttempts": 0,
- "expiryDate": 0
}
- 200
{- "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
Search for API keys using optional filters. For managing the CloudOne API Key, see the CloudOne API KEY Reference.
ApiKeysApi.searchApiKeys([param1, param2, ...])
APIKeysApi.search_api_keys([param1, param2, ...])
APIKeysApi.searchApiKeys([param1, param2, ...])
header Parameters
Request Body schema: application/json
A collection of options used to filter the search results.
successful operation
Not authorized to view API keys.
- Payload
- Java
- Python
- JavaScript
{- "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
}
- 200
{- "apiKeys": [
- {
- "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
Describe an API key by ID. For managing the CloudOne API Key, see the CloudOne API KEY Reference.
ApiKeysApi.describeApiKey([param1, param2, ...])
APIKeysApi.describe_api_key([param1, param2, ...])
APIKeysApi.describeApiKey([param1, param2, ...])
successful operation
Not authorized to view API keys.
The API key does not exist.
- Java
- Python
- JavaScript
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(); } } }
- 200
{- "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
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.
ApiKeysApi.modifyApiKey([param1, param2, ...])
APIKeysApi.modify_api_key([param1, param2, ...])
APIKeysApi.modifyApiKey([param1, param2, ...])
path Parameters
header Parameters
Request Body schema: application/json
The settings of the API key to modify.
successful operation
Not authorized to modify API keys or the requested modification is not permitted.
The API key does not exist.
- Payload
- Java
- Python
- JavaScript
{- "keyName": "string",
- "description": "string",
- "locale": "en-US",
- "roleID": 0,
- "timeZone": "string",
- "active": true,
- "created": 0,
- "lastSignIn": 0,
- "unlockTime": 0,
- "unsuccessfulSignInAttempts": 0,
- "expiryDate": 0
}
- 200
{- "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 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.
ApiKeysApi.deleteApiKey([param1, param2, ...])
APIKeysApi.delete_api_key([param1, param2, ...])
APIKeysApi.deleteApiKey([param1, param2, ...])
Request is successful.
Not authorized to delete API keys.
- Java
- Python
- JavaScript
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(); } } }