Certificates

Describe a Certificate

get/certificates/{certificateID}

Describe a certificate by ID.

Related SDK Methods:
Java

CertificatesApi.describeCertificate([param1, param2, ...])

Python

CertificatesApi.describe_certificate([param1, param2, ...])

JavaScript

CertificatesApi.describeCertificate([param1, param2, ...])

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

The ID number of the certificate to describe.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

404

The certificate 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.CertificatesApi;
import com.trendmicro.deepsecurity.model.Certificate;


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

Response samples
application/json
{
  • "ID": 0,
  • "certificate": "string",
  • "certificateDetails": {
    },
  • "trusted": true,
  • "purpose": "SSL"
}

Delete a Certificate

delete/certificates/{certificateID}

Delete a certificate by ID.

Related SDK Methods:
Java

CertificatesApi.deleteCertificate([param1, param2, ...])

Python

CertificatesApi.delete_certificate([param1, param2, ...])

JavaScript

CertificatesApi.deleteCertificate([param1, param2, ...])

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

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

204

Request is successful.

403

Not authorized to delete certificates.

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


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

Retrieve a Certificate by URL

get/certificates/target

Retrieve a certificate by URL.

Related SDK Methods:
Java

CertificatesApi.targetCertificate([param1, param2, ...])

Python

CertificatesApi.target_certificate([param1, param2, ...])

JavaScript

CertificatesApi.targetCertificate([param1, param2, ...])

Request
query Parameters
URL
required
string

The URL of the certificate to describe

header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

400

The certificate 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.CertificatesApi;
import com.trendmicro.deepsecurity.model.Certificate;


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

Response samples
application/json
{
  • "ID": 0,
  • "certificate": "string",
  • "certificateDetails": {
    },
  • "trusted": true,
  • "purpose": "SSL"
}

List Certificates

get/certificates

List all SSL certificates.

Related SDK Methods:
Java

CertificatesApi.listCertificates([param1, param2, ...])

Python

CertificatesApi.list_certificates([param1, param2, ...])

JavaScript

CertificatesApi.listCertificates([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

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.CertificatesApi;
import com.trendmicro.deepsecurity.model.Certificates;


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

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

Add a Certificate

post/certificates

Add a certificate to Deep Security Manager.

Related SDK Methods:
Java

CertificatesApi.addCertificate([param1, param2, ...])

Python

CertificatesApi.add_certificate([param1, param2, ...])

JavaScript

CertificatesApi.addCertificate([param1, param2, ...])

Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json
certificate
string

The certificate. It's a PEM formatted string

object (certificateDetails)

Certificate details

purpose
string

The type of connections for which the certificate is to be used.

Value: "SSL"
Responses
200

successful operation

400

The certificate is invalid or the requested certificate already exists.

403

Not authorized to add certificates.

Request samples
application/json
{
  • "certificate": "string",
  • "certificateDetails": { },
  • "purpose": "SSL"
}
Response samples
application/json
{
  • "ID": 0,
  • "certificate": "string",
  • "certificateDetails": {
    },
  • "trusted": true,
  • "purpose": "SSL"
}