Policy Device Control Exception Rules

List Device Exception Rules

get/policies/{policyID}/devicecontrol/usbdeviceexceptionrules

Lists all device exception rules assigned to a policy.

Related SDK Methods:
Java

PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy([param1, param2, ...])

Python

PolicyDeviceControlExceptionRulesApi.list_exception_rules_on_policy([param1, param2, ...])

JavaScript

PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy([param1, param2, ...])

Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only Exception Rules directly related to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

User or API key is not authorized to view the policy.

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.PolicyDeviceControlExceptionRulesApi;
import com.trendmicro.deepsecurity.model.ExceptionRules;


public class ListExceptionRulesOnPolicyExample {
	
	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
		PolicyDeviceControlExceptionRulesApi instance = new PolicyDeviceControlExceptionRulesApi();
		Integer policyID = 1;
		Boolean overrides = false;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ExceptionRules result = instance.listExceptionRulesOnPolicy(policyID, overrides, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling PolicyDeviceControlExceptionRulesApi.listExceptionRulesOnPolicy");
			e.printStackTrace();
		}
	}
}

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

Add Device Exception Rules

post/policies/{policyID}/devicecontrol/usbdeviceexceptionrules

Assign device exception rules to a policy.

Related SDK Methods:
Java

PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])

Python

PolicyDeviceControlExceptionRulesApi.add_exception_rules_on_policy([param1, param2, ...])

JavaScript

PolicyDeviceControlExceptionRulesApi.addExceptionRulesOnPolicy([param1, param2, ...])

Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only Exception Rules directly related to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

Exception Rules for the device.

Array of objects (ExceptionRule)
Responses
200

successful operation

403

User or API key is not authorized to modify the policy or the requested modification is not permitted.

404

The policy does not exist.

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

Set Device Exception Rules

put/policies/{policyID}/devicecontrol/usbdeviceexceptionrules

Set device exception rules assigned to a policy.

Related SDK Methods:
Java

PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])

Python

PolicyDeviceControlExceptionRulesApi.set_exception_rules_on_policy([param1, param2, ...])

JavaScript

PolicyDeviceControlExceptionRulesApi.setExceptionRulesOnPolicy([param1, param2, ...])

Request
path Parameters
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only Exception Rules directly related to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

Exception Rules for the device.

Array of objects (ExceptionRule)
Responses
200

successful operation

403

User or API key is not authorized to modify the policy or the requested modification is not permitted.

404

The policy does not exist.

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

Remove a Device Exception Rule

delete/policies/{policyID}/devicecontrol/usbdeviceexceptionrules/{exceptionRuleID}

Unassign a device exception rule from a policy.

Related SDK Methods:
Java

PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])

Python

PolicyDeviceControlExceptionRulesApi.remove_exception_rule_on_policy([param1, param2, ...])

JavaScript

PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy([param1, param2, ...])

Request
path Parameters
exceptionRuleID
required
integer <int64> \d+

The ID number of the Exception Rule to delete.

Example: 1
policyID
required
integer <int32> \d+

The ID number of the policy.

Example: 1
query Parameters
overrides
boolean

Return only Exception Rules directly related to the current policy.

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

User or API key is not authorized to modify the policy or the requested modification is not permitted.

404

The policy 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.PolicyDeviceControlExceptionRulesApi;
import com.trendmicro.deepsecurity.model.ExceptionRules;


public class RemoveExceptionRuleOnPolicyExample {
	
	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
		PolicyDeviceControlExceptionRulesApi instance = new PolicyDeviceControlExceptionRulesApi();
		Integer policyID = 1;
		Long exceptionRuleID = 1L;
		Boolean overrides = false;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ExceptionRules result = instance.removeExceptionRuleOnPolicy(policyID, exceptionRuleID, overrides, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling PolicyDeviceControlExceptionRulesApi.removeExceptionRuleOnPolicy");
			e.printStackTrace();
		}
	}
}

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