Policies

List Policies

get/policies

Lists all policies.

Related SDK Methods:
Java

PoliciesApi.listPolicies([param1, param2, ...])

Python

PoliciesApi.list_policies([param1, param2, ...])

JavaScript

PoliciesApi.listPolicies([param1, param2, ...])

Request
query Parameters
overrides
boolean

Show only overrides defined for the current policy.

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 policies.

Request samples
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.PoliciesApi;
import com.trendmicro.deepsecurity.model.Policies;


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

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

Create a Policy

post/policies

Create a new policy.

Related SDK Methods:
Java

PoliciesApi.createPolicy([param1, param2, ...])

Python

PoliciesApi.create_policy([param1, param2, ...])

JavaScript

PoliciesApi.createPolicy([param1, param2, ...])

Request
query Parameters
overrides
boolean

Show only overrides defined for the current policy.

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 policy.

object (ActivityMonitoringPolicyExtension)

Policy-level configuration for the Activity Monitoring module

object (AntiMalwarePolicyExtension)

Policy-level configuration for the Anti-Malware module

object (ApplicationControlPolicyExtension)

Policy-level configuration for the Application Control module

autoRequiresUpdate
string

Automatically update computers assigned this policy when the configuration changes. Searchable as Choice.

Enum: "off" "on"
description
string

Description of the policy. Searchable as String.

object (DeviceControlPolicyExtension)

Policy-level configuration for the Device Control module. Null for tenants for whom Device Control is hidden.

object (FirewallPolicyExtension)

Policy-level configuration for the Firewall module

object (IntegrityMonitoringPolicyExtension)

Policy-level configuration for the Integrity Monitoring module

object (InterfaceTypes)
object (IntrusionPreventionPolicyExtension)

Policy-level configuration for the Intrusion Prevention module

object (LogInspectionPolicyExtension)

Policy-level configuration for the Log Inspection module

name
string

Name of the policy. Searchable as String.

object (NewEndpointMetaAppsPolicyExtension)

Policy-level configuration for the NewEndpoint MetaApps Tier-2 .

parentID
integer <int32>

ID of the parent policy. Searchable as Numeric.

object (PolicySettings)
recommendationScanMode
string

Enable or disable ongoing recommendation scans for computers assigned this policy. Searchable as Choice.

Enum: "off" "ongoing"
object (SAPPolicyExtension)

Policy-level configuration for the SAP module

object (WebReputationPolicyExtension)

Policy-level configuration for the Web Reputation module

Responses
200

successful operation

403

Not authorized to create policies.

Request samples
application/json
{
  • "parentID": 0,
  • "name": "string",
  • "description": "string",
  • "policySettings": {
    },
  • "recommendationScanMode": "off",
  • "autoRequiresUpdate": "off",
  • "interfaceTypes": {
    },
  • "antiMalware": {
    },
  • "webReputation": {
    },
  • "deviceControl": {
    },
  • "activityMonitoring": {
    },
  • "firewall": {
    },
  • "intrusionPrevention": {
    },
  • "integrityMonitoring": {
    },
  • "logInspection": {
    },
  • "applicationControl": {
    },
  • "newEndpointMetaApps": {
    },
  • "SAP": {
    }
}
Response samples
application/json
{
  • "parentID": 0,
  • "name": "string",
  • "description": "string",
  • "policySettings": {
    },
  • "recommendationScanMode": "off",
  • "autoRequiresUpdate": "off",
  • "interfaceTypes": {
    },
  • "ID": 0,
  • "antiMalware": {
    },
  • "webReputation": {
    },
  • "deviceControl": {
    },
  • "activityMonitoring": {
    },
  • "firewall": {
    },
  • "intrusionPrevention": {
    },
  • "integrityMonitoring": {
    },
  • "logInspection": {
    },
  • "applicationControl": {
    },
  • "newEndpointMetaApps": {
    },
  • "SAP": {
    }
}

Describe a Policy

get/policies/{policyID}

Describe a policy by ID.

Related SDK Methods:
Java

PoliciesApi.describePolicy([param1, param2, ...])

Python

PoliciesApi.describe_policy([param1, param2, ...])

JavaScript

PoliciesApi.describePolicy([param1, param2, ...])

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

The ID number of the policy to describe.

Example: 1
query Parameters
overrides
boolean

Show only overrides defined for the current policy.

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 policies.

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.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.ApiException;
import com.trendmicro.deepsecurity.api.PoliciesApi;
import com.trendmicro.deepsecurity.model.Policy;


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

Response samples
application/json
{
  • "parentID": 0,
  • "name": "string",
  • "description": "string",
  • "policySettings": {
    },
  • "recommendationScanMode": "off",
  • "autoRequiresUpdate": "off",
  • "interfaceTypes": {
    },
  • "ID": 0,
  • "antiMalware": {
    },
  • "webReputation": {
    },
  • "deviceControl": {
    },
  • "activityMonitoring": {
    },
  • "firewall": {
    },
  • "intrusionPrevention": {
    },
  • "integrityMonitoring": {
    },
  • "logInspection": {
    },
  • "applicationControl": {
    },
  • "newEndpointMetaApps": {
    },
  • "SAP": {
    }
}

Modify a Policy

post/policies/{policyID}

Modify a policy by ID. Any unset elements will be left unchanged.

Related SDK Methods:
Java

PoliciesApi.modifyPolicy([param1, param2, ...])

Python

PoliciesApi.modify_policy([param1, param2, ...])

JavaScript

PoliciesApi.modifyPolicy([param1, param2, ...])

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

The ID number of the policy to modify.

Example: 1
query Parameters
overrides
boolean

Show only overrides defined for the current policy.

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 policy to modify.

object (ActivityMonitoringPolicyExtension)

Policy-level configuration for the Activity Monitoring module

object (AntiMalwarePolicyExtension)

Policy-level configuration for the Anti-Malware module

object (ApplicationControlPolicyExtension)

Policy-level configuration for the Application Control module

autoRequiresUpdate
string

Automatically update computers assigned this policy when the configuration changes. Searchable as Choice.

Enum: "off" "on"
description
string

Description of the policy. Searchable as String.

object (DeviceControlPolicyExtension)

Policy-level configuration for the Device Control module. Null for tenants for whom Device Control is hidden.

object (FirewallPolicyExtension)

Policy-level configuration for the Firewall module

object (IntegrityMonitoringPolicyExtension)

Policy-level configuration for the Integrity Monitoring module

object (InterfaceTypes)
object (IntrusionPreventionPolicyExtension)

Policy-level configuration for the Intrusion Prevention module

object (LogInspectionPolicyExtension)

Policy-level configuration for the Log Inspection module

name
string

Name of the policy. Searchable as String.

object (NewEndpointMetaAppsPolicyExtension)

Policy-level configuration for the NewEndpoint MetaApps Tier-2 .

parentID
integer <int32>

ID of the parent policy. Searchable as Numeric.

object (PolicySettings)
recommendationScanMode
string

Enable or disable ongoing recommendation scans for computers assigned this policy. Searchable as Choice.

Enum: "off" "ongoing"
object (SAPPolicyExtension)

Policy-level configuration for the SAP module

object (WebReputationPolicyExtension)

Policy-level configuration for the Web Reputation module

Responses
200

successful operation

403

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

404

The policy does not exist.

Request samples
    <