Scheduled Tasks

Describe a Scheduled Task

get/scheduledtasks/{scheduledTaskID}

Describe a scheduled task by ID.

Related SDK Methods:
Java

ScheduledTasksApi.describeScheduledTask([param1, param2, ...])

Python

ScheduledTasksApi.describe_scheduled_task([param1, param2, ...])

JavaScript

ScheduledTasksApi.describeScheduledTask([param1, param2, ...])

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

The ID number of the scheduled 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 scheduled 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.ApiException;
import com.trendmicro.deepsecurity.api.ScheduledTasksApi;
import com.trendmicro.deepsecurity.model.ScheduledTask;


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

Response samples
application/json
{
  • "name": "string",
  • "type": "scan-for-open-ports",
  • "scheduleDetails": {
    },
  • "enabled": true,
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "runNow": true,
  • "scanForOpenPortsTaskParameters": {
    },
  • "sendAlertSummaryTaskParameters": {
    },
  • "discoverComputersTaskParameters": {
    },
  • "runScriptTaskParameters": {
    },
  • "sendPolicyTaskParameters": {
    },
  • "generateReportTaskParameters": {
    },
  • "synchronizeDirectoryTaskParameters": {
    },
  • "scanForRecommendationsTaskParameters": {
    },
  • "synchronizeVCenterTaskParameters": {
    },
  • "scanForIntegrityChangesTaskParameters": {
    },
  • "scanForMalwareTaskParameters": {
    },
  • "checkForSecurityUpdatesTaskParameters": {
    },
  • "synchronizeCloudAccountTaskParameters": {
    },
  • "updateSuspiciousObjectsListTaskParameters": {
    },
  • "ID": 0
}

Modify a Scheduled Task

post/scheduledtasks/{scheduledTaskID}

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

Related SDK Methods:
Java

ScheduledTasksApi.modifyScheduledTask([param1, param2, ...])

Python

ScheduledTasksApi.modify_scheduled_task([param1, param2, ...])

JavaScript

ScheduledTasksApi.modifyScheduledTask([param1, param2, ...])

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

The ID number of the scheduled 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 scheduled task to modify.

object (CheckForSecurityUpdatesTaskParameters)

Controls the behavior of a scheduled task of type check-for-security-updates.

object (DiscoverComputersTaskParameters)

Controls the behavior of a scheduled task of type discover-computers.

enabled
boolean

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

object (GenerateReportTaskParameters)

Controls the behavior of a scheduled task of type generate-report.

lastRunTime
integer <int64>

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

name
string

Name of scheduled task. Searchable as String.

nextRunTime
integer <int64>

The next time this scheduled task is scheduled to run, or null if it not scheduled to run in the future. Searchable as Date.

runNow
boolean

Indicates that the scheduled task should execute immediately.

object (RunScriptTaskParameters)

Controls the behavior of a scheduled task of type run-script.

object (ScanForIntegrityChangesTaskParameters)

Controls the behavior of a scheduled task of type scan-for-integrity-changes.

object (ScanForMalwareTaskParameters)

Controls the behavior of a scheduled task of type: scan-for-malware.

object (ScanForOpenPortsTaskParameters)

Controls the behavior of a scheduled task of type scan-for-open-ports.

object (ScanForRecommendationsTaskParameters)

Controls the behavior of a scheduled task of type scan-for-recommendations.

object (ScheduleDetails)

Controls when a scheduled task runs.

object (SendAlertSummaryTaskParameters)

Controls the behavior of a scheduled task of type send-alert-summary.

object (SendPolicyTaskParameters)

Controls the behavior of a scheduled task of type send-policy.

object (SynchronizeCloudAccountTaskParameters)

Controls the behavior of a scheduled task of type synchronize-cloud-account.

object (SynchronizeDirectoryTaskParameters)

Controls the behavior of a scheduled task of type synchronize-cloud-account.

object (SynchronizeVCenterTaskParameters)

Controls the behavior of a scheduled task of type synchronize-vcenter.

type
string

Type of scheduled task. Searchable as Choice.

Enum: "scan-for-open-ports" "send-alert-summary" "discover-computers" "run-script" "send-policy" "generate-report" "synchronize-directory" "synchronize-users" "scan-for-recommendations" "synchronize-vcenter" "scan-for-integrity-changes" "scan-for-malware" "check-for-security-updates" "synchronize-cloud-account" "check-for-software-updates" "update-suspicious-objects-list"
object (UpdateSuspiciousObjectsListTaskParameters)

Controls the behavior of a scheduled task of type update-suspicious-objects-list.

Responses
200

successful operation

403

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

404

The scheduled task does not exist.

Request samples
application/json
{
  • "name": "string",
  • "type": "scan-for-open-ports",
  • "scheduleDetails": {
    },
  • "enabled": true,
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "runNow": true,
  • "scanForOpenPortsTaskParameters": {
    },
  • "sendAlertSummaryTaskParameters": {
    },
  • "discoverComputersTaskParameters": {
    },
  • "runScriptTaskParameters": {
    },
  • "sendPolicyTaskParameters": {
    },
  • "generateReportTaskParameters": {
    },
  • "synchronizeDirectoryTaskParameters": {
    },
  • "scanForRecommendationsTaskParameters": {
    },
  • "synchronizeVCenterTaskParameters": {
    },
  • "scanForIntegrityChangesTaskParameters": {
    },
  • "scanForMalwareTaskParameters": {
    },
  • "checkForSecurityUpdatesTaskParameters": {
    },
  • "synchronizeCloudAccountTaskParameters": {
    },
  • "updateSuspiciousObjectsListTaskParameters": {
    }
}
Response samples
application/json
{
  • "name": "string",
  • "type": "scan-for-open-ports",
  • "scheduleDetails": {
    },
  • "enabled": true,
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "runNow": true,
  • "scanForOpenPortsTaskParameters": {
    },
  • "sendAlertSummaryTaskParameters": {
    },
  • "discoverComputersTaskParameters": {
    },
  • "runScriptTaskParameters": {
    },
  • "sendPolicyTaskParameters": {
    },
  • "generateReportTaskParameters": {
    },
  • "synchronizeDirectoryTaskParameters": {
    },
  • "scanForRecommendationsTaskParameters": {
    },
  • "synchronizeVCenterTaskParameters": {
    },
  • "scanForIntegrityChangesTaskParameters": {
    },
  • "scanForMalwareTaskParameters": {
    },
  • "checkForSecurityUpdatesTaskParameters": {
    },
  • "synchronizeCloudAccountTaskParameters": {
    },
  • "updateSuspiciousObjectsListTaskParameters": {
    },
  • "ID": 0
}

Delete a Scheduled Task

delete/scheduledtasks/{scheduledTaskID}

Delete a scheduled task by ID.

Related SDK Methods:
Java

ScheduledTasksApi.deleteScheduledTask([param1, param2, ...])

Python

ScheduledTasksApi.delete_scheduled_task([param1, param2, ...])

JavaScript

ScheduledTasksApi.deleteScheduledTask([param1, param2, ...])

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

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

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


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

List Scheduled Tasks

get/scheduledtasks

Lists all scheduled tasks.

Related SDK Methods:
Java

ScheduledTasksApi.listScheduledTasks([param1, param2, ...])

Python

ScheduledTasksApi.list_scheduled_tasks([param1, param2, ...])

JavaScript

ScheduledTasksApi.listScheduledTasks([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 scheduled tasks.

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.ScheduledTasksApi;
import com.trendmicro.deepsecurity.model.ScheduledTasks;


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

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

Create a Scheduled Task

post/scheduledtasks

Create a new scheduled task.

Related SDK Methods:
Java

ScheduledTasksApi.createScheduledTask([param1, param2, ...])

Python

ScheduledTasksApi.create_scheduled_task([param1, param2, ...])

JavaScript

ScheduledTasksApi.createScheduledTask([param1, param2, ...])

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 scheduled task.

object (CheckForSecurityUpdatesTaskParameters)

Controls the behavior of a scheduled task of type check-for-security-updates.

object (DiscoverComputersTaskParameters)

Controls the behavior of a scheduled task of type discover-computers.

enabled
boolean

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

object (GenerateReportTaskParameters)

Controls the behavior of a scheduled task of type generate-report.

lastRunTime
integer <int64>

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

name
string

Name of scheduled task. Searchable as String.

nextRunTime
integer <int64>

The next time this scheduled task is scheduled to run, or null if it not scheduled to run in the future. Searchable as Date.

runNow
boolean

Indicates that the scheduled task should execute immediately.

object (RunScriptTaskParameters)

Controls the behavior of a scheduled task of type run-script.

object (ScanForIntegrityChangesTaskParameters)

Controls the behavior of a scheduled task of type scan-for-integrity-changes.

object (ScanForMalwareTaskParameters)

Controls the behavior of a scheduled task of type: scan-for-malware.

object (ScanForOpenPortsTaskParameters)

Controls the behavior of a scheduled task of type scan-for-open-ports.

object (ScanForRecommendationsTaskParameters)

Controls the behavior of a scheduled task of type scan-for-recommendations.

object (ScheduleDetails)

Controls when a scheduled task runs.

object (SendAlertSummaryTaskParameters)

Controls the behavior of a scheduled task of type send-alert-summary.

object (SendPolicyTaskParameters)

Controls the behavior of a scheduled task of type send-policy.

object (SynchronizeCloudAccountTaskParameters)

Controls the behavior of a scheduled task of type synchronize-cloud-account.

object (SynchronizeDirectoryTaskParameters)

Controls the behavior of a scheduled task of type synchronize-cloud-account.

object (SynchronizeVCenterTaskParameters)

Controls the behavior of a scheduled task of type synchronize-vcenter.

type
string

Type of scheduled task. Searchable as Choice.

Enum: "scan-for-open-ports" "send-alert-summary" "discover-computers" "run-script" "send-policy" "generate-report" "synchronize-directory" "synchronize-users" "scan-for-recommendations" "synchronize-vcenter" "scan-for-integrity-changes" "scan-for-malware" "check-for-security-updates" "synchronize-cloud-account" "check-for-software-updates" "update-suspicious-objects-list"
object (UpdateSuspiciousObjectsListTaskParameters)

Controls the behavior of a scheduled task of type update-suspicious-objects-list.

Responses
200

successful operation

403

Not authorized to create scheduled tasks.

Request samples
application/json
{
  • "name": "string",
  • "type": "scan-for-open-ports",
  • "scheduleDetails": {
    },
  • "enabled": true,
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "runNow": true,
  • "scanForOpenPortsTaskParameters": {
    },
  • "sendAlertSummaryTaskParameters": {
    },
  • "discoverComputersTaskParameters": {
    },
  • "runScriptTaskParameters": {
    },
  • "sendPolicyTaskParameters": {
    },
  • "generateReportTaskParameters": {
    },
  • "synchronizeDirectoryTaskParameters": {
    },
  • "scanForRecommendationsTaskParameters": {
    },
  • "synchronizeVCenterTaskParameters": {
    },
  • "scanForIntegrityChangesTaskParameters": {
    },
  • "scanForMalwareTaskParameters": {
    },
  • "checkForSecurityUpdatesTaskParameters": {
    },
  • "synchronizeCloudAccountTaskParameters": {
    },
  • "updateSuspiciousObjectsListTaskParameters": {
    }
}
Response samples
application/json
{
  • "name": "string",
  • "type": "scan-for-open-ports",
  • "scheduleDetails": {
    },
  • "enabled": true,
  • "lastRunTime": 0,
  • "nextRunTime": 0,
  • "runNow": true,
  • "scanForOpenPortsTaskParameters": {
    },
  • "sendAlertSummaryTaskParameters": {
    },
  • "discoverComputersTaskParameters": {
    },
  • "runScriptTaskParameters": {
    },
  • "sendPolicyTaskParameters": {
    },
  • "generateReportTaskParameters": {
    },
  • "synchronizeDirectoryTaskParameters": {
    },
  • "scanForRecommendationsTaskParameters": {
    },
  • "synchronizeVCenterTaskParameters": {
    },
  • "scanForIntegrityChangesTaskParameters": {
    },
  • "scanForMalwareTaskParameters": {
    },
  • "checkForSecurityUpdatesTaskParameters": {
    },
  • "synchronizeCloudAccountTaskParameters": {
    },
  • "updateSuspiciousObjectsListTaskParameters": {
    },
  • "ID": 0
}

Search Scheduled Tasks

post/scheduledtasks/search

Search for scheduled tasks using optional filters.

Related SDK Methods:
Java

ScheduledTasksApi.searchScheduledTasks([param1, param2, ...])

Python

ScheduledTasksApi.search_scheduled_tasks([param1, param2, ...])

JavaScript

ScheduledTasksApi.searchScheduledTasks([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 scheduled tasks.

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