List Certificates
List all SSL certificates.
CertificatesApi.listCertificates([param1, param2, ...])
CertificatesApi.list_certificates([param1, param2, ...])
CertificatesApi.listCertificates([param1, param2, ...])
successful operation
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; 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 Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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(); } } }
- 200
{- "certificates": [
- {
- "ID": 0,
- "certificate": "string",
- "certificateDetails": {
- "issuerDN": "string",
- "subjectDN": "string",
- "notBefore": 0,
- "notAfter": 0,
- "serialNumber": "string",
- "sha1Fingerprint": "string",
- "sha256Fingerprint": "string"
}, - "trusted": true,
- "purpose": "SSL"
}
]
}
Add a Certificate
Add a certificate to Deep Security Manager.
CertificatesApi.addCertificate([param1, param2, ...])
CertificatesApi.add_certificate([param1, param2, ...])
CertificatesApi.addCertificate([param1, param2, ...])
header Parameters
Request Body schema: application/json
successful operation
The certificate is invalid or the requested certificate already exists.
Not authorized to add certificates.
- Payload
- Java
- Python
- JavaScript
{- "certificate": "string",
- "certificateDetails": { },
- "purpose": "SSL"
}
- 200
{- "ID": 0,
- "certificate": "string",
- "certificateDetails": {
- "issuerDN": "string",
- "subjectDN": "string",
- "notBefore": 0,
- "notAfter": 0,
- "serialNumber": "string",
- "sha1Fingerprint": "string",
- "sha256Fingerprint": "string"
}, - "trusted": true,
- "purpose": "SSL"
}
Describe a Certificate
Describe a certificate by ID.
CertificatesApi.describeCertificate([param1, param2, ...])
CertificatesApi.describe_certificate([param1, param2, ...])
CertificatesApi.describeCertificate([param1, param2, ...])
successful operation
The certificate does not exist.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; 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 Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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(); } } }
- 200
{- "ID": 0,
- "certificate": "string",
- "certificateDetails": {
- "issuerDN": "string",
- "subjectDN": "string",
- "notBefore": 0,
- "notAfter": 0,
- "serialNumber": "string",
- "sha1Fingerprint": "string",
- "sha256Fingerprint": "string"
}, - "trusted": true,
- "purpose": "SSL"
}
Delete a Certificate
Delete a certificate by ID.
CertificatesApi.deleteCertificate([param1, param2, ...])
CertificatesApi.delete_certificate([param1, param2, ...])
CertificatesApi.deleteCertificate([param1, param2, ...])
Request is successful.
Request is successful.
Not authorized to delete certificates.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; 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 Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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
Retrieve a certificate by URL
CertificatesApi.targetCertificate([param1, param2, ...])
CertificatesApi.target_certificate([param1, param2, ...])
CertificatesApi.targetCertificate([param1, param2, ...])
successful operation
The certificate does not exist.
- Java
- Python
- JavaScript
import com.trendmicro.deepsecurity.ApiClient; import com.trendmicro.deepsecurity.Configuration; import com.trendmicro.deepsecurity.auth.ApiKeyAuth; 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 Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key"); Legacy API Key.setApiKey("YOUR API KEY"); try { defaultClient.trustAllCertificates(false); } catch (Exception e) { System.err.println("An exception occurred when calling ApiClient.trustAllCertificates"); e.printStackTrace(); } ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key"); Trend Micro Cloud One API Key.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(); } } }
- 200
{- "ID": 0,
- "certificate": "string",
- "certificateDetails": {
- "issuerDN": "string",
- "subjectDN": "string",
- "notBefore": 0,
- "notAfter": 0,
- "serialNumber": "string",
- "sha1Fingerprint": "string",
- "sha256Fingerprint": "string"
}, - "trusted": true,
- "purpose": "SSL"
}