列出端点

POST
https://daas.digicert.com/apicontroller/v1/reports/viewIpPort

获取通过 CertCentral Discovery 扫描发现了证书的所有端点服务器的总数和列表。选择性地按服务器或扫描属性筛选结果。

cURL
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
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
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
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
{
    "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"
            }
        ]
    }
}

请求参数

名称 请求/选项 类型 描述
searchCriteriaList 可选 array 获取指定条件的记录。
.. key 可选 string 搜索参数。
允许的值:serialNumber,ip,port,scanName,serverSecurity,isCertPresent,cn
.. operation 可选 string 搜索操作。
允许的值:EQUALS
.. value 可选 array 搜索值。
accountId 必填 string 帐号。
divisionIds 可选 array 分区 ID。
startIndex 可选 int 从指定索引开始。
默认值:1
pageSize 可选 int 每页的记录数。
默认值:50
sortedColumnId 可选 string 结果按指定参数排序。
允许的值:serialNumber,ip,port,scanName,serverSecurity,isCertPresent,cn
默认值:isCertPresent
sortOrder 可选 string 按方向排序。
允许的值:DESC(降序:9-0,Z-A),ASC(升序:0-9,A-Z)
默认值:DESC

响应参数

名称 类型 描述
data object 容器。
.. totalCount int 与搜索条件匹配的总记录数。
.. currentCount int 当前页的记录数。
.. onlineIPPortDetailsDTOList array 端点详细信息的容器。
.. .. commonName string 在端点上找到的证书的公用名。
.. .. port string 在其中找到了证书的端口。
.. .. ipAddress string 端点的 IP 地址。
.. .. portStatus string 端点的可用性或连接状态。
.. .. isCertPresent bool 在端点上是否安装了证书。
.. .. serverSecurityRating string 服务器安全性评级,基于端点的通信和安全设置。
.. .. service string 通信协议,例如 https
.. .. deviceType string 一般硬件类型(如果可用)。
.. .. serverName string 服务器软件(如果可用)。
.. .. serverVersion string 服务器版本(如果可用)。
.. .. scanId string 扫描并提取了端点详细信息的 CertCentral Discovery 扫描的唯一 ID。
.. .. scanName string 管理员提供给 CertCentral Discovery 扫描的友好名称。
.. .. domainName string 端点的根域。
.. .. firstDiscoveredDate string 日期端点被 CertCentral Discovery 扫描最先找到。
.. .. certificateId string 为在端点上找到的证书生成的唯一 DigiCert ID。需要它的 API 请求的用途。
.. .. os string 操作系统。
.. .. osVersion string 操作系统版本(如果可用)。
.. .. vulnerabilityName string 基于已知的端点详细信息找到的漏洞。
.. .. serverId string 服务器 ID(如果可用)。
.. .. san string 在端点上找到的证书的使用者可选名称。
.. .. org string 在端点上找到的证书的组织名称。
.. .. certExpiryDate string 在端点上找到的证书的到期日期。
.. .. certStatus string 状态 在端点上找到的证书的
.. .. certRating string 证书安全性评级,基于行业标准和证书设置。
.. .. ca string 颁发证书的证书颁发机构。
.. .. serialNumber string 在颁发时分配给证书的序列号。