下載憑證 (序列號)

GET
https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}

使用此端點下載在使用憑證的序列號的 CT 記錄中找到的憑證。

這是指派給有關發行的憑證的序列號。

要求和回應範例

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}"

payload = ""
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}"

	req, _ := http.NewRequest("GET", url, nil)

	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: 'GET',
  url: 'https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

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

  console.log(body);
});
200 OK
{
    "pem": "<certificate in pem format>"
}

要求 URL 查詢字串

使用 ? 將 URL 查詢字串附加到端點 URL 中。

例如:

markup
https://www.digicert.com/services/v2/ctmonitor/{{order_id }}/ct-cert/{{serial_id}}/?issuer={{issuer}}
名稱 必填/選填 類型 說明
issuer 必填 string 發行憑證的憑證授權機關名稱。

回應參數

名稱 類型 說明
pem string PEM 格式的 TLS/SSL 憑證