Describe a global rule
Describe a global rule by ID.
GlobalRulesApi.describeGlobalRule([param1, param2, ...])
GlobalRulesApi.describe_global_rule([param1, param2, ...])
GlobalRulesApi.describeGlobalRule([param1, param2, ...])
successful operation
Not authorized to view global rules
The rule 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.auth.ApiKeyAuth; import com.trendmicro.deepsecurity.ApiException; import com.trendmicro.deepsecurity.api.GlobalRulesApi; import com.trendmicro.deepsecurity.model.ApplicationControlGlobalRule; public class DescribeGlobalRuleExample { 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 GlobalRulesApi instance = new GlobalRulesApi(); Long ruleID = 1L; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours ApplicationControlGlobalRule result = instance.describeGlobalRule(ruleID, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling GlobalRulesApi.describeGlobalRule"); e.printStackTrace(); } } }
- 200
{- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string",
- "action": "block",
- "lastUpdatedAdministrator": 0,
- "lastUpdated": 0,
- "ID": 0
}
Modify a global rule
Modify a global rule by ID. Any unset elements will be left unchanged.
GlobalRulesApi.modifyGlobalRule([param1, param2, ...])
GlobalRulesApi.modify_global_rule([param1, param2, ...])
GlobalRulesApi.modifyGlobalRule([param1, param2, ...])
header Parameters
Request Body schema: application/json
The settings of the rule to be modified.
successful operation
Not authorized to modify rules or the requested modification is not permitted.
The rule does not exist.
- Payload
- Java
- Python
- JavaScript
{- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string"
}
- 200
{- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string",
- "action": "block",
- "lastUpdatedAdministrator": 0,
- "lastUpdated": 0,
- "ID": 0
}
Delete a global rule
Delete a global rule by ID.
GlobalRulesApi.deleteGlobalRule([param1, param2, ...])
GlobalRulesApi.delete_global_rule([param1, param2, ...])
GlobalRulesApi.deleteGlobalRule([param1, param2, ...])
Request is successful.
Request is successful.
Not authorized to delete rules.
- 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.GlobalRulesApi; public class DeleteGlobalRuleExample { 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 GlobalRulesApi instance = new GlobalRulesApi(); Long ruleID = 1L; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours instance.deleteGlobalRule(ruleID, apiVersion); } catch (ApiException e) { System.err.println("An exception occurred when calling GlobalRulesApi.deleteGlobalRule"); e.printStackTrace(); } } }
List all global rules
List all global rules.
GlobalRulesApi.listGlobalRules([param1, param2, ...])
GlobalRulesApi.list_global_rules([param1, param2, ...])
GlobalRulesApi.listGlobalRules([param1, param2, ...])
successful operation
Not authorized to view global rules
- 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.GlobalRulesApi; import com.trendmicro.deepsecurity.model.ApplicationControlGlobalRules; public class ListGlobalRulesExample { 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 GlobalRulesApi instance = new GlobalRulesApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours ApplicationControlGlobalRules result = instance.listGlobalRules(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling GlobalRulesApi.listGlobalRules"); e.printStackTrace(); } } }
- 200
{- "applicationControlGlobalRules": [
- {
- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string",
- "action": "block",
- "lastUpdatedAdministrator": 0,
- "lastUpdated": 0,
- "ID": 0
}
]
}
Create and add new global rules
Create and add global rules.
GlobalRulesApi.addGlobalRules([param1, param2, ...])
GlobalRulesApi.add_global_rules([param1, param2, ...])
GlobalRulesApi.addGlobalRules([param1, param2, ...])
successful operation
Not authorized to add global rules.
- Payload
- Java
- Python
- JavaScript
{- "applicationControlGlobalRules": [
- {
- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string"
}
]
}
- 200
{- "applicationControlGlobalRules": [
- {
- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string",
- "action": "block",
- "lastUpdatedAdministrator": 0,
- "lastUpdated": 0,
- "ID": 0
}
]
}
Search global rules
Search for global rules using optional filters.
GlobalRulesApi.searchGlobalRules([param1, param2, ...])
GlobalRulesApi.search_global_rules([param1, param2, ...])
GlobalRulesApi.searchGlobalRules([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 global rules
- 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
{- "applicationControlGlobalRules": [
- {
- "sha256": "string",
- "sha1": "string",
- "md5": "string",
- "description": "string",
- "action": "block",
- "lastUpdatedAdministrator": 0,
- "lastUpdated": 0,
- "ID": 0
}
]
}