Rulesets

Search Rulesets

post/rulesets/search

Search for rulesets using optional filters.

Related SDK Methods:
Java

RulesetsApi.searchRulesets([param1, param2, ...])

Python

RulesetsApi.search_rulesets([param1, param2, ...])

JavaScript

RulesetsApi.searchRulesets([param1, param2, ...])

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

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

List Rulesets

get/rulesets

Lists all rulesets.

Related SDK Methods:
Java

RulesetsApi.listRulesets([param1, param2, ...])

Python

RulesetsApi.list_rulesets([param1, param2, ...])

JavaScript

RulesetsApi.listRulesets([param1, param2, ...])

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

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.RulesetsApi;
import com.trendmicro.deepsecurity.model.Rulesets;


public class ListRulesetsExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Rulesets result = instance.listRulesets(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.listRulesets");
			e.printStackTrace();
		}
	}
}

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

Create a Shared Ruleset

post/rulesets

Create a new shared ruleset.

Related SDK Methods:
Java

RulesetsApi.createRuleset([param1, param2, ...])

Python

RulesetsApi.create_ruleset([param1, param2, ...])

JavaScript

RulesetsApi.createRuleset([param1, param2, ...])

Request
query Parameters
softwareinventoryid
required
integer <int64>

ID of the software inventory to base the ruleset on.

Example: softwareinventoryid=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 new ruleset.

description
string

Description of the ruleset. Searchable as String.

name
string

Name of the ruleset. Searchable as String.

Responses
200

successful operation

403

Not authorized to create rulesets.

Request samples
application/json
{
  • "name": "string",
  • "description": "string"
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "version": 0,
  • "type": "local-file",
  • "created": 0,
  • "lastUpdated": 0,
  • "ID": 0
}

Describe a Ruleset

get/rulesets/{rulesetID}

Describe a ruleset by ID.

Related SDK Methods:
Java

RulesetsApi.describeRuleset([param1, param2, ...])

Python

RulesetsApi.describe_ruleset([param1, param2, ...])

JavaScript

RulesetsApi.describeRuleset([param1, param2, ...])

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

The ID number of the ruleset 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 rulesets.

404

The ruleset 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.RulesetsApi;
import com.trendmicro.deepsecurity.model.Ruleset;


public class DescribeRulesetExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		Long rulesetID = 1L;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Ruleset result = instance.describeRuleset(rulesetID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.describeRuleset");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "version": 0,
  • "type": "local-file",
  • "created": 0,
  • "lastUpdated": 0,
  • "ID": 0
}

Delete a Ruleset

delete/rulesets/{rulesetID}

Delete a ruleset by ID.

Related SDK Methods:
Java

RulesetsApi.deleteRuleset([param1, param2, ...])

Python

RulesetsApi.delete_ruleset([param1, param2, ...])

JavaScript

RulesetsApi.deleteRuleset([param1, param2, ...])

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

The ID number of the ruleset 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.

204

Request is successful.

403

Not authorized to delete rulesets.

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


public class DeleteRulesetExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		Long rulesetID = 1L;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			instance.deleteRuleset(rulesetID, apiVersion);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.deleteRuleset");
			e.printStackTrace();
		}
	}
}

List Ruleset Rules

get/rulesets/{rulesetID}/rules

List all rules of a ruleset by ID.

Related SDK Methods:
Java

RulesetsApi.listRulesetRules([param1, param2, ...])

Python

RulesetsApi.list_ruleset_rules([param1, param2, ...])

JavaScript

RulesetsApi.listRulesetRules([param1, param2, ...])

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

The ID number of the ruleset.

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

404

The ruleset 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.RulesetsApi;
import com.trendmicro.deepsecurity.model.ApplicationControlRules;


public class ListRulesetRulesExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		Long rulesetID = 1L;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApplicationControlRules result = instance.listRulesetRules(rulesetID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.listRulesetRules");
			e.printStackTrace();
		}
	}
}

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

Search Ruleset Rules

post/rulesets/{rulesetID}/rules/search

Search for ruleset rules using optional filters.

Related SDK Methods:
Java

RulesetsApi.searchRulesetRules([param1, param2, ...])

Python

RulesetsApi.search_ruleset_rules([param1, param2, ...])

JavaScript

RulesetsApi.searchRulesetRules([param1, param2, ...])

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

The ID number of the ruleset.

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

404

The ruleset does not exist.

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

Describe a Ruleset Rule

get/rulesets/{rulesetID}/rules/{ruleID}

Describe a ruleset rule by ID.

Related SDK Methods:
Java

RulesetsApi.describeRulesetRule([param1, param2, ...])

Python

RulesetsApi.describe_ruleset_rule([param1, param2, ...])

JavaScript

RulesetsApi.describeRulesetRule([param1, param2, ...])

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

The ID number of the rule to describe.

Example: 1
rulesetID
required
integer <int64> \d+

The ID number of the ruleset.

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

404

The ruleset does not exist or the rule 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.RulesetsApi;
import com.trendmicro.deepsecurity.model.ApplicationControlRule;


public class DescribeRulesetRuleExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		Long rulesetID = 1L;
		Long ruleID = 1L;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			ApplicationControlRule result = instance.describeRulesetRule(rulesetID, ruleID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.describeRulesetRule");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "sha256": "string",
  • "size": 0,
  • "action": "allow",
  • "path": "string",
  • "fileName": "string",
  • "lastUpdatedAdministrator": 0,
  • "lastUpdated": 0,
  • "ID": 0
}

Modify a Ruleset Rule

post/rulesets/{rulesetID}/rules/{ruleID}

Modify a ruleset rule by ID.

Related SDK Methods:
Java

RulesetsApi.modifyRulesetRule([param1, param2, ...])

Python

RulesetsApi.modify_ruleset_rule([param1, param2, ...])

JavaScript

RulesetsApi.modifyRulesetRule([param1, param2, ...])

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

The ID number of the rule to modify.

Example: 1
rulesetID
required
integer <int64> \d+

The ID number of the ruleset.

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

action
string

Action to take when a user launches the executable. Searchable as Choice.

Enum: "allow" "block"
Responses
200

successful operation

403

Not authorized to modify rulesets.

404

The ruleset does not exist or the rule does not exist.

Request samples
application/json
{
  • "action": "allow"
}
Response samples
application/json
{
  • "sha256": "string",
  • "size": 0,
  • "action": "allow",
  • "path": "string",
  • "fileName": "string",
  • "lastUpdatedAdministrator": 0,
  • "lastUpdated": 0,
  • "ID": 0
}

Delete a Ruleset Rule

delete/rulesets/{rulesetID}/rules/{ruleID}

Delete a ruleset rule by ID.

Related SDK Methods:
Java

RulesetsApi.deleteRulesetRule([param1, param2, ...])

Python

RulesetsApi.delete_ruleset_rule([param1, param2, ...])

JavaScript

RulesetsApi.deleteRulesetRule([param1, param2, ...])

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

The ID number of the rule to delete.

Example: 1
rulesetID
required
integer <int64> \d+

The ID number of the ruleset.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

Request is successful.

204

Request is successful.

403

Not authorized to modify rulesets.

404

The ruleset 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.RulesetsApi;


public class DeleteRulesetRuleExample {
	
	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
		RulesetsApi instance = new RulesetsApi();
		Long rulesetID = 1L;
		Long ruleID = 1L;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			instance.deleteRulesetRule(rulesetID, ruleID, apiVersion);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling RulesetsApi.deleteRulesetRule");
			e.printStackTrace();
		}
	}
}