Proxies

List Proxies

get/proxies

Lists all proxies.

Related SDK Methods:
Java

ProxiesApi.listProxies([param1, param2, ...])

Python

ProxiesApi.list_proxies([param1, param2, ...])

JavaScript

ProxiesApi.listProxies([param1, param2, ...])

Request
query Parameters
includesSG
boolean

includes sg settings. default: false

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 proxies.

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.ProxiesApi;
import com.trendmicro.deepsecurity.model.Proxies;


public class ListProxiesExample {
	
	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
		ProxiesApi instance = new ProxiesApi();
		Boolean includesSG = true;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Proxies result = instance.listProxies(includesSG, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling ProxiesApi.listProxies");
			e.printStackTrace();
		}
	}
}

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

Create a Proxy

post/proxies

Create a new proxy.

Related SDK Methods:
Java

ProxiesApi.createProxy([param1, param2, ...])

Python

ProxiesApi.create_proxy([param1, param2, ...])

JavaScript

ProxiesApi.createProxy([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 proxy to modify.

authenticated
boolean

Flag indicating whether access to the proxy is authenticated. Default is "false".

description
string

Description of the proxy. The maximum length is 2000 characters. Searchable as String.

hostName
required
string

Host name of the proxy. The maximum length is 254 characters. Searchable as String.

ips
string

IPs of the proxy. A comma separated string.

name
required
string

Name of the proxy. The maximum length is 254 characters. Searchable as String.

password
string

Password of the proxy, write only. The maximum length is 254 characters.

port
required
integer <int32>

Port of the proxy.

protocol
string

Protocol of the proxy. Default is "http".

Enum: "http" "socks4" "socks5"
proxyType
string

Type of proxy. support: 'userAssignedProxy', 'serviceGatewayProxy'

sgproxy
boolean
username
string

Username of the proxy. The maximum length is 254 characters.

Responses
200

successful operation

403

Not authorized to create proxies.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hostName": "string",
  • "port": 0,
  • "protocol": "http",
  • "authenticated": true,
  • "username": "string",
  • "password": "string",
  • "proxyType": "string",
  • "sgproxy": true,
  • "ips": "string"
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hostName": "string",
  • "port": 0,
  • "protocol": "http",
  • "authenticated": true,
  • "username": "string",
  • "password": "string",
  • "proxyType": "string",
  • "sgproxy": true,
  • "ID": 0,
  • "ips": "string"
}

Describe a Proxy

get/proxies/{proxyID}

Describe a proxy by ID.

Related SDK Methods:
Java

ProxiesApi.describeProxy([param1, param2, ...])

Python

ProxiesApi.describe_proxy([param1, param2, ...])

JavaScript

ProxiesApi.describeProxy([param1, param2, ...])

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

The ID number of the proxy to describe.

Example: 1
query Parameters
proxyType
string

Type of proxy

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 proxies.

404

The proxy 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.ProxiesApi;
import com.trendmicro.deepsecurity.model.Proxy;


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

Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hostName": "string",
  • "port": 0,
  • "protocol": "http",
  • "authenticated": true,
  • "username": "string",
  • "password": "string",
  • "proxyType": "string",
  • "sgproxy": true,
  • "ID": 0,
  • "ips": "string"
}

Modify a Proxy

post/proxies/{proxyID}

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

Related SDK Methods:
Java

ProxiesApi.modifyProxy([param1, param2, ...])

Python

ProxiesApi.modify_proxy([param1, param2, ...])

JavaScript

ProxiesApi.modifyProxy([param1, param2, ...])

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

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

authenticated
boolean

Flag indicating whether access to the proxy is authenticated. Default is "false".

description
string

Description of the proxy. The maximum length is 2000 characters. Searchable as String.

hostName
required
string

Host name of the proxy. The maximum length is 254 characters. Searchable as String.

ips
string

IPs of the proxy. A comma separated string.

name
required
string

Name of the proxy. The maximum length is 254 characters. Searchable as String.

password
string

Password of the proxy, write only. The maximum length is 254 characters.

port
required
integer <int32>

Port of the proxy.

protocol
string

Protocol of the proxy. Default is "http".

Enum: "http" "socks4" "socks5"
proxyType
string

Type of proxy. support: 'userAssignedProxy', 'serviceGatewayProxy'

sgproxy
boolean
username
string

Username of the proxy. The maximum length is 254 characters.

Responses
200

successful operation

403

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

404

The proxy does not exist.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hostName": "string",
  • "port": 0,
  • "protocol": "http",
  • "authenticated": true,
  • "username": "string",
  • "password": "string",
  • "proxyType": "string",
  • "sgproxy": true,
  • "ips": "string"
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "hostName": "string",
  • "port": 0,
  • "protocol": "http",
  • "authenticated": true,
  • "username": "string",
  • "password": "string",
  • "proxyType": "string",
  • "sgproxy": true,
  • "ID": 0,
  • "ips": "string"
}

Delete a Proxy

delete/proxies/{proxyID}

Delete a proxy by ID.

Related SDK Methods:
Java

ProxiesApi.deleteProxy([param1, param2, ...])

Python

ProxiesApi.delete_proxy([param1, param2, ...])

JavaScript

ProxiesApi.deleteProxy([param1, param2, ...])

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

The ID number of the proxy 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 proxies.

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


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

Search Proxies

post/proxies/search

Search for proxies using optional filters.

Related SDK Methods:
Java

ProxiesApi.searchProxies([param1, param2, ...])

Python

ProxiesApi.search_proxies([param1, param2, ...])

JavaScript

ProxiesApi.searchProxies([param1, param2, ...])

Request
query Parameters
includesSG
boolean

includes sg settings. default: false

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 proxies.

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