Policy Migration Tasks

Describe a Policy Migration Task

get/policymigrationtasks/{policyMigrationTaskID}

Describe a policy migration task.

Related SDK Methods:
Java

PolicyMigrationTasksApi.describePolicyMigrationTask([param1, param2, ...])

Python

PolicyMigrationTasksApi.describe_policy_migration_task([param1, param2, ...])

JavaScript

PolicyMigrationTasksApi.describePolicyMigrationTask([param1, param2, ...])

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

The ID number of the policy migration task to describe.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200successful operation
400The Workload Security link does not exist.
403Not authorized to migrate policies.
404The policy migration task does not exist.
502Failed to connect to Workload Security.
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.PolicyMigrationTasksApi;
import com.trendmicro.deepsecurity.model.PolicyMigrationTask;


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

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

List Policy Migration Tasks

get/policymigrationtasks

Describe a policy migration task.

Related SDK Methods:
Java

PolicyMigrationTasksApi.listPolicyMigrationTasks([param1, param2, ...])

Python

PolicyMigrationTasksApi.list_policy_migration_tasks([param1, param2, ...])

JavaScript

PolicyMigrationTasksApi.listPolicyMigrationTasks([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200successful operation
400The Workload Security link does not exist.
403Not authorized to migrate policies.
502Failed to connect to Workload Security.
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.PolicyMigrationTasksApi;
import com.trendmicro.deepsecurity.model.PolicyMigrationTasks;


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

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

Create a Policy Migration Task

post/policymigrationtasks

Create a new policy migration task.

Related SDK Methods:
Java

PolicyMigrationTasksApi.createPolicyMigrationTask([param1, param2, ...])

Python

PolicyMigrationTasksApi.create_policy_migration_task([param1, param2, ...])

JavaScript

PolicyMigrationTasksApi.createPolicyMigrationTask([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200successful operation
400The Workload Security link does not exist.
403Not authorized to migrate policies.
409A policy migration task already exists.
502Failed to connect to Workload Security.
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.PolicyMigrationTasksApi;
import com.trendmicro.deepsecurity.model.PolicyMigrationTask;


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

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

Search Policy Migration Tasks

post/policymigrationtasks/search

Search for policy migration tasks using optional filters.

Related SDK Methods:
Java

PolicyMigrationTasksApi.searchPolicyMigrationTasks([param1, param2, ...])

Python

PolicyMigrationTasksApi.search_policy_migration_tasks([param1, param2, ...])

JavaScript

PolicyMigrationTasksApi.searchPolicyMigrationTasks([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
200successful operation
400The Workload Security link does not exist.
403Not authorized to migrate policies.
502Failed to connect to Workload Security.
Request samples
application/json
{
  • "maxItems": 0,
  • "searchCriteria": [
    ],
  • "sortByObjectID": true
}
Response samples
application/json
{
  • "policyMigrationTasks": [
    ]
}