获取特定证书的详细信息。详细信息包括可分辨名称信息、CA 信息、有效期、加密类型,等等。
curl -X POST \
https://daas.digicert.com/apicontroller/v1/certificate/getCertificateDetails \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"accountId": "126993",
"certificateId": "fb92ee3a2fd0cb6549e58c252f8787f467bfbeff",
"divisionId": "69748"
}'
import requests
url = "https://daas.digicert.com/apicontroller/v1/certificate/getCertificateDetails"
payload = "{\n \"accountId\": \"126993\",\n \"certificateId\": \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\",\n \"divisionId\": \"69748\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json",
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://daas.digicert.com/apicontroller/v1/certificate/getCertificateDetails"
payload := strings.NewReader("{\n \"accountId\": \"126993\",\n \"certificateId\": \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\",\n \"divisionId\": \"69748\"\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))
}
var request = require("request");
var options = { method: 'POST',
url: 'https://daas.digicert.com/apicontroller/v1/certificate/getCertificateDetails',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ accountId: '126993',
certificateId: 'fb92ee3a2fd0cb6549e58c252f8787f467bfbeff',
divisionId: 69748 },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"data": {
"certId": "fb92ee3a2fd0cb6549e58c252f8787f467bfbeff",
"serialNum": "2bf1c0d8a20fef721f67011d6231c16e",
"validFrom": 1523318400000,
"expiryDate": 1591660799000,
"subject": "CN=*.aparat.com,OU=EssentialSSL Wildcard,OU=Domain Control Validated",
"issuedBy": "CN=COMODO RSA Domain Validation Secure Server CA, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB",
"cn": "*.aparat.com",
"ca": "Comodo",
"firstDiscoveredDate": 1561409074447,
"keyLength": 2048,
"algoType": "SHA256withRSA",
"accountId": "126993",
"certStatusString": "VALID",
"owner": null,
"org": null,
"orgUnit": "Domain Control Validated",
"city": null,
"state": null,
"country": null,
"sanCount": 2,
"publicKeyAlgo": "RSA",
"san": "*.aparat.com,aparat.com",
"certRating": "Secure",
"tags": null,
"certStatusError": null,
"certIssues": "512"
}
}
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
accountId | 必填 | string | 帐号。 |
divisionIds | 可选 | array | 分区 ID。 |
certificateId | 必填 | string | 为在端点上找到的证书生成的唯一 DigiCert ID。从列出证书请求获取证书 ID。 |
名称 | 类型 | 描述 |
---|---|---|
data | object | 容器。 |
.. certId | string | 为在端点上找到的证书生成的唯一 DigiCert ID。 |
.. serialNum | string | 在颁发时分配给证书的序列号。 |
.. validFrom | string | 有效期开始日期。 |
.. expiryDate | string | 有效期结束日期。 |
.. subject | string | 完整的证书可分辨名称。 |
.. issuedBy | string | 从中颁发证书的根证书。 |
.. cn | string | 证书上的公用名。 |
.. ca | string | 颁发证书的证书颁发机构。 |
.. firstDiscoveredDate | string | 日期证书被 CertCentral Discovery 扫描首次找到。 |
.. keyLength | string | 证书的加密密钥大小。 |
.. algoType | string | 证书使用的加密算法。 |
.. accountId | string | 帐号。 |
.. certStatusString | string |
状态证书的 。
|
.. owner | string | CertCentral Discovery 中定义的所有者。 |
.. org | string | 证书上的组织名称。 |
.. orgunit | string | 证书上的组织单位。 |
.. city | string | 证书上的城市。 |
.. state | string | 证书上的州。 |
.. country | string | 证书上的国家/地区。 |
.. sanCount | string | 证书上的使用者可选名称的数量。 |
.. publicKeyAlgo | string | 证书公钥的加密算法。 |
.. san | string | 证书上的使用者可选名称。 |
.. certRating | string |
证书安全性评级 ,基于行业标准和证书设置。
|
.. tags | string | 证书所有者、订户或其他管理员添加的自定义标签。 |
.. certStatusError | string | 检索证书状态时出现错误。 |
.. certIssues | string | 证书颁发的图表数据。 |