取得憑證鏈詳細資料

POST
https://daas.digicert.com/apicontroller/v1/certificate/getCertChainDetails

取得與特定憑證關聯的中繼 CA 和其他憑證鏈資訊。

cURL
curl -X POST \
  https://daas.digicert.com/apicontroller/v1/certificate/getCertChainDetails \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
    "accountId": "126993",
    "certChainId": "4852981",
    "divisionId": "69748"
}'
Python
import requests

url = "https://daas.digicert.com/apicontroller/v1/certificate/getCertChainDetails"

payload = "{\n    \"accountId\": \"126993\",\n    \"certChainId\": \"4852981\",\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)
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://daas.digicert.com/apicontroller/v1/certificate/getCertChainDetails"

	payload := strings.NewReader("{\n    \"accountId\": \"126993\",\n    \"certChainId\": \"4852981\",\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))

}
NodeJS
var request = require("request");

var options = { method: 'POST',
  url: 'https://daas.digicert.com/apicontroller/v1/certificate/getCertChainDetails',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { accountId: '126993',
     certChainId: '4852981',
     divisionId: 69748 },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
    "data": {
        "certChainDetailsList": [
            {
                "certDetailsList": [
                    {
                        "status": "Valid",
                        "expirationDate": 2145916799000,
                        "keyAlgorithm": "RSA2048",
                        "algorithmType": "SHA256withRSA",
                        "issueDate": 1251763200000,
                        "issuerDN": "CN=DigiCert Root Certificate Authority - G2, O=\"DigiCert Inc.\", L=Citytown, ST=Arizona, C=US",
                        "subject": "CN=DigiCert Root Certificate Authority - G2,O=DigiCert \\, Inc.,L=Citytown,ST=Arizona,C=US(root)",
                        "errors": null
                    },
                    {
                        "status": "Valid",
                        "expirationDate": 1935558000000,
                        "keyAlgorithm": "RSA2048",
                        "algorithmType": "SHA256withRSA",
                        "issueDate": 1304406000000,
                        "issuerDN": "CN=DigiCert Root Certificate Authority - G2, O=\"DigiCert Inc.\", L=Citytown, ST=Arizona, C=US",
                        "subject": "CN=DigiCert Secure Certificate Authority - G2,OU=http://certs.digi.com/repository/,O=DigiCert\\, Inc.,L=CitytownST=Arizona,C=US(intermediate)",
                        "errors": null
                    },
                    {
                        "status": "Valid",
                        "expirationDate": 1575457523000,
                        "keyAlgorithm": "RSA2048",
                        "algorithmType": "SHA256withRSA",
                        "issueDate": 1503317044000,
                        "issuerDN": "CN=DigiCert Secure Certificate Authority - G2, OU=http://certs.digi.com/repository/, O=\"DigiCert Inc.\", L=CitytownST=Arizona, C=US",
                        "subject": "CN=*.flipkart.com,OU=Domain Control Validated(end-entity)",
                        "errors": null
                    }
                ],
                "overallStatus": "Primary Chain (Valid)",
                "isAdditionalCertChain": null,
                "isValidChain": true
            }
        ]
    }
}

要求參數

名稱 必填/選填 類型 說明
accountId 必填 string 帳戶 ID。
divisionIds 選填 array 分區 ID。
certChainId 必填 string 憑證鏈 ID。取得來自取得端點評級要求的憑證鏈 ID。

回應參數

名稱 類型 說明
data object 容器。
.. certChainDetailsList array 憑證鏈詳細資料容器。
.. .. certDetailsList array 憑證鏈詳細資料容器。
.. .. .. status string 狀態。
.. .. .. expirationDate string 到期日。
.. .. .. keyAlgorithm string 加密演算法。
.. .. .. algorithmType string SHA 類型。
.. .. .. issueDate string 發行日期。
.. .. .. issuerDN string 發行者名稱。
.. .. .. subject string 憑證主體。
.. .. .. errors array 錯誤訊息。
.. .. overallStatus string 整體狀態。
.. .. isAdditionalCertChain bool 無論是否找到預期的憑證鏈以外的憑證鏈。
.. .. isValidChain bool 無論鏈是否有效。