Event Based Tasks

Describe an Event Based Task

get/eventbasedtasks/{eventBasedTaskID}

Describe an event based task by ID.

Related SDK Methods:
Java

EventBasedTasksApi.describeEventBasedTask([param1, param2, ...])

Python

EventBasedTasksApi.describe_event_based_task([param1, param2, ...])

JavaScript

EventBasedTasksApi.describeEventBasedTask([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
eventBasedTaskID
required
integer <int32> \d+

The ID number of the event based task 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 scheduled tasks.

404

The event based task 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.EventBasedTasksApi;
import com.trendmicro.deepsecurity.model.EventBasedTask;


public class DescribeEventBasedTaskExample {
	
	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
		EventBasedTasksApi instance = new EventBasedTasksApi();
		Integer eventBasedTaskID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			EventBasedTask result = instance.describeEventBasedTask(eventBasedTaskID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling EventBasedTasksApi.describeEventBasedTask");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "name": "string",
  • "type": "computer-created-by-system",
  • "enabled": true,
  • "lastRunTime": 0,
  • "actions": [
    ],
  • "conditions": [
    ],
  • "ID": 0
}

Modify an Event Based Task

post/eventbasedtasks/{eventBasedTaskID}

Modify an event based task by ID. Any unset elements will be left unchanged.

Related SDK Methods:
Java

EventBasedTasksApi.modifyEventBasedTask([param1, param2, ...])

Python

EventBasedTasksApi.modify_event_based_task([param1, param2, ...])

JavaScript

EventBasedTasksApi.modifyEventBasedTask([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
eventBasedTaskID
required
integer <int32> \d+

The ID number of the event based task to modify.

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 event based task to modify.

Array of objects (EventBasedTaskAction)

List of actions to perform when an event based task condition is met.

Array of objects (EventBasedTaskCondition)

List of conditions that must be met in order for an event based task to run its actions.

enabled
boolean

Indicates whether or not the event based task is enabled. Searchable as Boolean.

lastRunTime
integer <int64>

The last time this event based task was run, or null if never run. Searchable as Date.

name
string

Name of event based task. Searchable as String.

type
string

Type of scheduled task. Searchable as Choice.

Enum: "computer-created-by-system" "computer-moved-by-system" "agent-initiated-activation" "agent-ip-changed" "nsx-protection-changed" "computer-powered-on-by-system"
Responses
200

successful operation

403

Not authorized to modify event based tasks or the requested modification is not permitted.

404

The event based task does not exist.

Request samples
application/json
{
  • "name": "string",
  • "type": "computer-created-by-system",
  • "enabled": true,
  • "lastRunTime": 0,
  • "actions": [
    ],
  • "conditions": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "type": "computer-created-by-system",
  • "enabled": true,
  • "lastRunTime": 0,
  • "actions": [
    ],
  • "conditions": [
    ],
  • "ID": 0
}

Delete an Event Based Task

delete/eventbasedtasks/{eventBasedTaskID}

Delete an event based task by ID.

Related SDK Methods:
Java

EventBasedTasksApi.deleteEventBasedTask([param1, param2, ...])

Python

EventBasedTasksApi.delete_event_based_task([param1, param2, ...])

JavaScript

EventBasedTasksApi.deleteEventBasedTask([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
eventBasedTaskID
required
integer <int32> \d+

The ID number of the event based task 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.

403

Not authorized to delete event based tasks.

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


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

List Event Based Tasks

get/eventbasedtasks

Lists all event based tasks.

Related SDK Methods:
Java

EventBasedTasksApi.listEventBasedTasks([param1, param2, ...])

Python

EventBasedTasksApi.list_event_based_tasks([param1, param2, ...])

JavaScript

EventBasedTasksApi.listEventBasedTasks([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
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 scheduled tasks.

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.EventBasedTasksApi;
import com.trendmicro.deepsecurity.model.EventBasedTasks;


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

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

Create an Event Based Task

post/eventbasedtasks

Create a new event based task.

Related SDK Methods:
Java

EventBasedTasksApi.createEventBasedTask([param1, param2, ...])

Python

EventBasedTasksApi.create_event_based_task([param1, param2, ...])

JavaScript

EventBasedTasksApi.createEventBasedTask([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
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 event based task.

Array of objects (EventBasedTaskAction)

List of actions to perform when an event based task condition is met.

Array of objects (EventBasedTaskCondition)

List of conditions that must be met in order for an event based task to run its actions.

enabled
boolean

Indicates whether or not the event based task is enabled. Searchable as Boolean.

lastRunTime
integer <int64>

The last time this event based task was run, or null if never run. Searchable as Date.

name
string

Name of event based task. Searchable as String.

type
string

Type of scheduled task. Searchable as Choice.

Enum: "computer-created-by-system" "computer-moved-by-system" "agent-initiated-activation" "agent-ip-changed" "nsx-protection-changed" "computer-powered-on-by-system"
Responses
200

successful operation

403

Not authorized to create event based tasks.

Request samples
application/json
{
  • "name": "string",
  • "type": "computer-created-by-system",
  • "enabled": true,
  • "lastRunTime": 0,
  • "actions": [
    ],
  • "conditions": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "type": "computer-created-by-system",
  • "enabled": true,
  • "lastRunTime": 0,
  • "actions": [
    ],
  • "conditions": [
    ],
  • "ID": 0
}

Search Event Based Tasks

post/eventbasedtasks/search

Search for event based tasks using optional filters.

Related SDK Methods:
Java

EventBasedTasksApi.searchEventBasedTasks([param1, param2, ...])

Python

EventBasedTasksApi.search_event_based_tasks([param1, param2, ...])

JavaScript

EventBasedTasksApi.searchEventBasedTasks([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
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 scheduled tasks.

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