MAC Lists

List MAC Lists

get/maclists

Lists all MAC lists.

Related SDK Methods:
Java

MacListsApi.listMACLists([param1, param2, ...])

Python

MACListsApi.list_mac_lists([param1, param2, ...])

JavaScript

MACListsApi.listMACLists([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 MAC 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.MacListsApi;
import com.trendmicro.deepsecurity.model.MacLists;


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

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

Create a MAC List

post/maclists

Create a new MAC list.

Related SDK Methods:
Java

MacListsApi.createMACList([param1, param2, ...])

Python

MACListsApi.create_mac_list([param1, param2, ...])

JavaScript

MACListsApi.createMACList([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 MAC list.

description
string

Description of the MAC address list. Searchable as String.

items
Array of strings

List of comma-delimited MAC addresses. The list can also contain comments and other information that is parsed out.

name
string

Name of the MAC address list. Searchable as String.

Responses
200

successful operation

403

Not authorized to create MAC lists.

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

Search MAC Lists

post/maclists/search

Search for MAC lists using optional filters.

Related SDK Methods:
Java

MacListsApi.searchMACLists([param1, param2, ...])

Python

MACListsApi.search_mac_lists([param1, param2, ...])

JavaScript

MACListsApi.searchMACLists([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 MAC lists.

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

Describe a MAC List

get/maclists/{macListID}

Describe a MAC list by ID.

Related SDK Methods:
Java

MacListsApi.describeMACList([param1, param2, ...])

Python

MACListsApi.describe_mac_list([param1, param2, ...])

JavaScript

MACListsApi.describeMACList([param1, param2, ...])

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

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

404

The MAC 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.MacListsApi;
import com.trendmicro.deepsecurity.model.MacList;


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

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

Modify a MAC List

post/maclists/{macListID}

Modify a MAC list by ID.

Related SDK Methods:
Java

MacListsApi.modifyMACList([param1, param2, ...])

Python

MACListsApi.modify_mac_list([param1, param2, ...])

JavaScript

MACListsApi.modifyMACList([param1, param2, ...])

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

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

description
string

Description of the MAC address list. Searchable as String.

items
Array of strings

List of comma-delimited MAC addresses. The list can also contain comments and other information that is parsed out.

name
string

Name of the MAC address list. Searchable as String.

Responses
200

successful operation

403

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

404

The MAC 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 a MAC List

delete/maclists/{macListID}

Delete a MAC list by ID.

Related SDK Methods:
Java

MacListsApi.deleteMACList([param1, param2, ...])

Python

MACListsApi.delete_mac_list([param1, param2, ...])

JavaScript

MACListsApi.deleteMACList([param1, param2, ...])

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

The ID number of the MAC 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 MAC 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.MacListsApi;


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