Policy Import Tasks

List PolicyImportTasks

get/policyimporttasks

List all policy import tasks.

Related SDK Methods:
Java

PolicyImportTasksApi.listPolicyImportTasks([param1, param2, ...])

Python

PolicyImportTasksApi.list_policy_import_tasks([param1, param2, ...])

JavaScript

PolicyImportTasksApi.listPolicyImportTasks([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 import poilcy.

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.PolicyImportTasksApi;
import com.trendmicro.deepsecurity.model.PolicyImportTasks;


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

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

Create a PolicyImportTask

post/policyimporttasks

Create a task to import policy

Related SDK Methods:
Java

PolicyImportTasksApi.createPolicyImportTask([param1, param2, ...])

Python

PolicyImportTasksApi.create_policy_import_task([param1, param2, ...])

JavaScript

PolicyImportTasksApi.createPolicyImportTask([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

Policy import task to create

policyContent
string

Policy content zip and encoded by base64, write only.

sourceHostName
string

(Optional) Source Deep Security Manager hostname. Searchable as String.

Responses
200

successful operation

403

Not authorized to import poilcy.

Request samples
application/json
{
  • "policyContent": "string",
  • "sourceHostName": "string"
}
Response samples
application/json
{
  • "policyContent": "string",
  • "status": "requested",
  • "created": 0,
  • "lastUpdated": 0,
  • "policyMappings": [
    ],
  • "errorCode": 0,
  • "ID": 0,
  • "taskGUID": "string",
  • "sourceHostName": "string"
}

Describe a PolicyImportTask

get/policyimporttasks/{policyImportTaskID}

Describe a policy import task by ID.

Related SDK Methods:
Java

PolicyImportTasksApi.describePolicyImportTask([param1, param2, ...])

Python

PolicyImportTasksApi.describe_policy_import_task([param1, param2, ...])

JavaScript

PolicyImportTasksApi.describePolicyImportTask([param1, param2, ...])

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

The ID number of the policy import 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 import poilcy.

404

The policy import 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.PolicyImportTasksApi;
import com.trendmicro.deepsecurity.model.PolicyImportTask;


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

Response samples
application/json
{
  • "policyContent": "string",
  • "status": "requested",
  • "created": 0,
  • "lastUpdated": 0,
  • "policyMappings": [
    ],
  • "errorCode": 0,
  • "ID": 0,
  • "taskGUID": "string",
  • "sourceHostName": "string"
}

Search PolicyImportTasks

post/policyimporttasks/search

Search for PolicyImportTasks using optional filters.

Related SDK Methods:
Java

PolicyImportTasksApi.searchPolicyImportTasks([param1, param2, ...])

Python

PolicyImportTasksApi.search_policy_import_tasks([param1, param2, ...])

JavaScript

PolicyImportTasksApi.searchPolicyImportTasks([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 import poilcy.

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