Schedules

List Schedules

get/schedules

Lists all schedules.

Related SDK Methods:
Java

SchedulesApi.listSchedules([param1, param2, ...])

Python

SchedulesApi.list_schedules([param1, param2, ...])

JavaScript

SchedulesApi.listSchedules([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 schedules.

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.SchedulesApi;
import com.trendmicro.deepsecurity.model.Schedules;


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

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

Create a Schedule

post/schedules

Create a new schedule.

Related SDK Methods:
Java

SchedulesApi.createSchedule([param1, param2, ...])

Python

SchedulesApi.create_schedule([param1, param2, ...])

JavaScript

SchedulesApi.createSchedule([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 schedule.

description
string

Description of the Schedule. Searchable as String.

hoursOfWeek
Array of booleans

An array of 168 boolean values representing each hour in the week starting Sunday at 0:00. A value of 'true' marks the given hour as 'on'.

name
string

Display name of the Schedule. Searchable as String.

Responses
200

successful operation

403

Not authorized to create schedules.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hoursOfWeek": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hoursOfWeek": [
    ],
  • "ID": 0
}

Describe a Schedule

get/schedules/{scheduleID}

Describe a schedule by ID.

Related SDK Methods:
Java

SchedulesApi.describeSchedule([param1, param2, ...])

Python

SchedulesApi.describe_schedule([param1, param2, ...])

JavaScript

SchedulesApi.describeSchedule([param1, param2, ...])

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

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

404

The schedule 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.SchedulesApi;
import com.trendmicro.deepsecurity.model.Schedule;


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

Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hoursOfWeek": [
    ],
  • "ID": 0
}

Modify a Schedule

post/schedules/{scheduleID}

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

Related SDK Methods:
Java

SchedulesApi.modifySchedule([param1, param2, ...])

Python

SchedulesApi.modify_schedule([param1, param2, ...])

JavaScript

SchedulesApi.modifySchedule([param1, param2, ...])

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

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

description
string

Description of the Schedule. Searchable as String.

hoursOfWeek
Array of booleans

An array of 168 boolean values representing each hour in the week starting Sunday at 0:00. A value of 'true' marks the given hour as 'on'.

name
string

Display name of the Schedule. Searchable as String.

Responses
200

successful operation

403

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

404

The schedule does not exist.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hoursOfWeek": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hoursOfWeek": [
    ],
  • "ID": 0
}

Delete a Schedule

delete/schedules/{scheduleID}

Delete a schedule by ID.

Related SDK Methods:
Java

SchedulesApi.deleteSchedule([param1, param2, ...])

Python

SchedulesApi.delete_schedule([param1, param2, ...])

JavaScript

SchedulesApi.deleteSchedule([param1, param2, ...])

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

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

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


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

Search Schedules

post/schedules/search

Search for schedules using optional filters.

Related SDK Methods:
Java

SchedulesApi.searchSchedules([param1, param2, ...])

Python

SchedulesApi.search_schedules([param1, param2, ...])

JavaScript

SchedulesApi.searchSchedules([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 schedules.

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