--- title: "List endpoints" source_url: https://dev.digicert.com/certcentral-apis/discovery-api/certificates/list-endpoints.html api_method: POST api_endpoint: "/apicontroller/v1/reports/viewIpPort" api_url: "https://daas.digicert.com/apicontroller/v1/reports/viewIpPort" --- **POST** `https://daas.digicert.com/apicontroller/v1/reports/viewIpPort` Get a total count and list of all endpoint servers that have certificates found through CertCentral Discovery scans. Optionally filter results by server or scan attributes. ## Example requests and responses **cURL** ```bash curl -X POST \ https://daas.digicert.com/apicontroller/v1/reports/viewIpPort \ -H 'Content-Type: application/json' \ -H 'X-DC-DEVKEY: {{api_key}}' \ -d '{ "searchCriteriaList": [ { "key":"serialNumber", "operation": "EQUALS", "value": [ "0eb6eab418c873d8f3c031dcdddf18b0" ] }, { "key":"ip", "operation": "EQUALS", "value": [ "www.itc.com","www.digicert.com","www.cert.com","wmart.com","ph.com" ] }, { "key":"port", "operation": "EQUALS", "value": [ 3389,636,443,80,389,8443 ] }, { "key":"scanName", "operation": "EQUALS", "value": [ "ScanWithAllVul","GtScdlV612Aug19" ] }, { "key":"serverSecurity", "operation": "EQUALS", "value": [ "NO_VULNERABILITY_FOUND" ] }, { "key":"isCertPresent", "operation": "EQUALS", "value": [ true ] }, { "key":"cn", "operation": "EQUALS", "value": [ "www.origin.digicert.com" ] } ], "accountId": "126993", "divisionIds": [], "startIndex": 1, "pageSize": 50, "sortedColumnId": null, "sortOrder": "ASC" }' ``` **Python** ```python import requests url = "https://daas.digicert.com/apicontroller/v1/reports/viewIpPort" payload = "{\n \"searchCriteriaList\": [\n {\n \"key\": \"serialNumber\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"0eb6eab418c873d8f3c031dcdddf18b0\"\n ]\n },\n {\n \"key\": \"ip\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.itc.com\",\"www.digicert.com\",\"www.cert.com\",\"wmart.com\",\"ph.com\"\n ]\n },\n {\n \"key\": \"port\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"3389\",\"636\",\"443\",\"80\",\"389\",\"8443\"\n ]\n },\n {\n \"key\": \"scanName\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"ScanWithAllVul\",\"GtScdlV612Aug19\"\n ]\n },\n {\n \"key\": \"serverSecurity\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"NO_VULNERABILITY_FOUND\"\n ]\n },\n {\n \"key\": \"isCertPresent\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"true\"\n ]\n },\n {\n \"key\": \"cn\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.origin.digicert.com\"\n ]\n }\n ],\n \"accountId\": \"126993\",\n \"divisionIds\": [],\n \"startIndex\": 1,\n \"pageSize\": 50,\n \"sortedColumnId\": null,\n \"sortOrder\": \"ASC\"\n}" headers = { 'X-DC-DEVKEY': "{{api_key}}", 'Content-Type': "application/json", } response = requests.request("POST", url, data=payload, headers=headers) print(response.text) ``` **Go** ```go package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://daas.digicert.com/apicontroller/v1/reports/viewIpPort" payload := strings.NewReader("{\n \"searchCriteriaList\": [\n {\n \"key\": \"serialNumber\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"0eb6eab418c873d8f3c031dcdddf18b0\"\n ]\n },\n {\n \"key\": \"ip\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.itc.com\",\"www.digicert.com\",\"www.cert.com\",\"wmart.com\",\"ph.com\"\n ]\n },\n {\n \"key\": \"port\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"3389\",\"636\",\"443\",\"80\",\"389\",\"8443\"\n ]\n },\n {\n \"key\": \"scanName\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"ScanWithAllVul\",\"GtScdlV612Aug19\"\n ]\n },\n {\n \"key\": \"serverSecurity\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"NO_VULNERABILITY_FOUND\"\n ]\n },\n {\n \"key\": \"isCertPresent\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"true\"\n ]\n },\n {\n \"key\": \"cn\",\n \"operation\": \"EQUALS\",\n \"value\": [\n \"www.origin.digicert.com\"\n ]\n }\n ],\n \"accountId\": \"126993\",\n \"divisionIds\": [],\n \"startIndex\": 1,\n \"pageSize\": 50,\n \"sortedColumnId\": null,\n \"sortOrder\": \"ASC\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-DC-DEVKEY", "{{api_key}}") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` **NodeJS** ```javascript var request = require("request"); var options = { method: 'POST', url: 'https://daas.digicert.com/apicontroller/v1/reports/viewIpPort', headers: { 'Content-Type': 'application/json', 'X-DC-DEVKEY': '{{api_key}}' }, body: { searchCriteriaList: [ { key: 'serialNumber', operation: 'EQUALS', value: [ '0eb6eab418c873d8f3c031dcdddf18b0' ] }, { key: 'ip', operation: 'EQUALS', value: [ 'www.itc.com','www.digicert.com','www.cert.com','wmart.com','ph.com' ] }, { key: 'port', operation: 'EQUALS', value: [ '3389','636','443','80','389','8443' ] }, { key: 'scanName', operation: 'EQUALS', value: [ 'ScanWithAllVul','GtScdlV612Aug19' ] }, { key: 'serverSecurity', operation: 'EQUALS', value: [ 'NO_VULNERABILITY_FOUND' ] }, { key: 'isCertPresent', operation: 'EQUALS', value: [ 'true' ] }, { key: 'cn', operation: 'EQUALS', value: [ 'www.origin.digicert.com' ] } ], accountId: '126993', divisionIds: [], startIndex: 1, pageSize: 50, sortedColumnId: null, sortOrder: 'ASC' }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); ``` ## 200 OK ```json { "data": { "totalCount": 728, "currentCount": 50, "onlineIPPortDetailsDTOList": [ { "commonName": "www.digicert.com", "port": 443, "ipAddress": "digicert.com", "portStatus": null, "isCertPresent": true, "serverSecurityRating": "Not secure", "service": "https", "devicetype": "Unavailable", "serverName": "Unavailable", "serverVersion": "Unavailable", "scanId": null, "scanName": "Ray test scan", "domainName": "digicert.com", "firstDiscoveredDate": 1563917837971, "certificateId": "041340bf2a9fb794d30fda13395b314ae67df53d", "os": "", "osVersion": null, "vulnerabilityName": "POODLE (TLS)", "serverId": 1634548, "san": "www.digicert.com,ak-dfw01-www.digicert.com,ak-dal01-www.digicert.com,www.dig-cert.com,digicert.com", "org": "DigiCert, Inc.", "certExpiryDate": 1581162880000, "certStatus": "VALID", "certRating": "Very secure", "ca": "DigiCert", "serialNumber": "3abd311ca0530854676aab23" }, { "commonName": "*.stackexchange.com", "port": 443, "ipAddress": "stackoverflow.com", "portStatus": null, "isCertPresent": true, "serverSecurityRating": "Secure", "service": "https", "devicetype": "", "serverName": "Unavailable", "serverVersion": "Unavailable", "scanId": null, "scanName": "Morpheus", "domainName": "stackoverflow.com", "firstDiscoveredDate": 1561409075964, "certificateId": "390a4684b989444a6d286705acd429415a9c433d", "os": "", "osVersion": null, "vulnerabilityName": "", "serverId": 1407732, "san": "*.askubuntu.com,*.blogoverflow.com,*.mathoverflow.net,*.meta.stackexchange.com,*.meta.stackoverflow.com,*.serverfault.com,*.sstatic.net,*.stackexchange.com,*.stackoverflow.com,*.stackoverflow.email,*.superuser.com,askubuntu.com,blogoverflow.com,mathoverflow.net,openid.stackauth.com,serverfault.com,sstatic.net,stackapps.com,stackauth.com,stackexchange.com,stackoverflow.blog,stackoverflow.com,stackoverflow.email,stacksnippets.net,superuser.com", "org": "", "certExpiryDate": 1566927383000, "certStatus": "EXPIRED", "certRating": "Secure", "ca": "Let's Encrypt", "serialNumber": "039980940a562af6fb09e8a984d2a14c6ec9" } ] } } ``` ## Request parameters
| Name | Req/Opt | Type | Description |
|---|---|---|---|
| searchCriteriaList | optional | array | Get records for specified criteria. |
| .. key | optional | string | Search parameter. Allowed values: serialNumber, ip, port, scanName, serverSecurity, isCertPresent, cn |
| .. operation | optional | string | Search operation. Allowed value: EQUALS |
| .. value | optional | array | Search values. |
| accountId | required | string | Account ID. |
| divisionIds | optional | array | Division IDs. |
| startIndex | optional | integer | Start at the specified index. Default: 1 |
| pageSize | optional | integer | Number of records per page. Default: 50,Max: 100 |
| sortedColumnId | optional | string | Sort results by specified parameter. Allowed values: serialNumber, ip, port, scanName, serverSecurity, isCertPresent, cnDefault: isCertPresent |
| sortOrder | optional | string | Sort direction. Allowed values: DESC (descending: 9-0, Z-A), ASC (ascending: 0-9, A-Z)Default: DESC |
| Name | Type | Description |
|---|---|---|
| data | object | Container. |
| .. totalCount | integer | Total number of records that match search criteria. |
| .. currentCount | integer | Number of records on current page. |
| .. onlineIPPortDetailsDTOList | array | Container for endpoint details. |
| .. .. commonName | string | Common name of certificate found on the endpoint. |
| .. .. port | string | Port that the certificate was found on. |
| .. .. ipAddress | string | IP address of the endpoint. |
| .. .. portStatus | string | Availability or connection status of the endpoint. |
| .. .. isCertPresent | bool | Whether or not certificate is installed at the endpoint. |
| .. .. serverSecurityRating | string | Server security rating, based on the endpoint's communication and security settings. |
| .. .. service | string | Communication protocol, such as https. |
| .. .. deviceType | string | General hardware type, if available. |
| .. .. serverName | string | Server software, if available. |
| .. .. serverVersion | string | Server version, if available. |
| .. .. scanId | string | Unique ID for the CertCentral Discovery scan that scanned and retrieved details for the endpoint. |
| .. .. scanName | string | Friendly name the admin gave to the CertCentral Discovery scan. |
| .. .. domainName | string | Root domain of the endpoint. |
| .. .. firstDiscoveredDate | integer | Date endpoint was first found by CertCentral Discovery scan. Format:epoch in millisecond. Epoch corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system. Example: 1855828800000 |
| .. .. certificateId | string | Unique DigiCert-generated ID for the certificate found on the endpoint. Use for API requests that require it. |
| .. .. os | string | Operating system. |
| .. .. osVersion | string | Operating system version, if available. |
| .. .. vulnerabilityName | string | Vulnerabilities found based on known endpoint details. |
| .. .. serverId | string | Server ID that uniquely identifies the record. |
| .. .. san | string | Subject alternative names on the certificate found on the endpoint. |
| .. .. org | string | Organization name on the certificate found on the endpoint. |
| .. .. certExpiryDate | integer | Expiration date of the certificate found on the endpoint. Format:epoch in millisecond. Epoch corresponds to 0 hours, 0 minutes, and 0 seconds (00:00:00) Coordinated Universal Time (UTC) on a specific date, which varies from system to system. Example: 1855828800000 |
| .. .. certStatus | string | Status of the certificate found on the endpoint. |
| .. .. certRating | string | Certificate security rating, based on industry standards and the certificate's settings. |
| .. .. ca | string | Certificate Authority that issued the certificate. |
| .. .. serialNumber | string | Serial number assigned to the certificate on issuance. |