IP Lists

List IP Lists

get/iplists

Lists all IP lists.

Related SDK Methods:
Java

IpListsApi.listIPLists([param1, param2, ...])

Python

IPListsApi.list_ip_lists([param1, param2, ...])

JavaScript

IPListsApi.listIPLists([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 IP lists.

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.IpListsApi;
import com.trendmicro.deepsecurity.model.IpLists;


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

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

Create an IP List

post/iplists

Create a new IP list.

Related SDK Methods:
Java

IpListsApi.createIPList([param1, param2, ...])

Python

IPListsApi.create_ip_list([param1, param2, ...])

JavaScript

IPListsApi.createIPList([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 IP list.

description
string

Description of the IP list. Searchable as String.

items
Array of strings

List of comma-delimited IP addresses. Can contain individual IPs, masked IPs (for example: "192.168.2.0./24", "192.168.2.0/255.255.255.0" or "2001:0DB8::CD30:0:0:0:0/60") or IP ranges (for example: "192.168.0.2 - 192.168.0.125" or "FF01::101 - FF01::102").

name
string

Name of the IP list. Searchable as String.

Responses
200

successful operation

403

Not authorized to create IP lists.

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

Search IP Lists

post/iplists/search

Search for IP lists using optional filters.

Related SDK Methods:
Java

IpListsApi.searchIPLists([param1, param2, ...])

Python

IPListsApi.search_ip_lists([param1, param2, ...])

JavaScript

IPListsApi.searchIPLists([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 IP lists.

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

Describe an IP List

get/iplists/{ipListID}

Describe an IP list by ID.

Related SDK Methods:
Java

IpListsApi.describeIPList([param1, param2, ...])

Python

IPListsApi.describe_ip_list([param1, param2, ...])

JavaScript

IPListsApi.describeIPList([param1, param2, ...])

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

The ID number of the IP list 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 IP lists.

404

The IP list 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.IpListsApi;
import com.trendmicro.deepsecurity.model.IpList;


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

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

Modify an IP List

post/iplists/{ipListID}

Modify an IP list by ID. Any unset elements will be left unchanged.

Related SDK Methods:
Java

IpListsApi.modifyIPList([param1, param2, ...])

Python

IPListsApi.modify_ip_list([param1, param2, ...])

JavaScript

IPListsApi.modifyIPList([param1, param2, ...])

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

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

description
string

Description of the IP list. Searchable as String.

items
Array of strings

List of comma-delimited IP addresses. Can contain individual IPs, masked IPs (for example: "192.168.2.0./24", "192.168.2.0/255.255.255.0" or "2001:0DB8::CD30:0:0:0:0/60") or IP ranges (for example: "192.168.0.2 - 192.168.0.125" or "FF01::101 - FF01::102").

name
string

Name of the IP list. Searchable as String.

Responses
200

successful operation

403

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

404

The IP list does not exist.

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

Delete an IP List

delete/iplists/{ipListID}

Delete an IP list by ID.

Related SDK Methods:
Java

IpListsApi.deleteIPList([param1, param2, ...])

Python

IPListsApi.delete_ip_list([param1, param2, ...])

JavaScript

IPListsApi.deleteIPList([param1, param2, ...])

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

The ID number of the IP list 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 IP lists.

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


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