即将到期的证书

GET
https://www.digicert.com/services/v2/report/order/expiring

使用此端点获取您的整个帐户中即将在 90 天、60 天和 30 天后到期的证书的数量。还返回在过去 7 天内到期的证书。

cURL
curl -X GET \
  https://www.digicert.com/services/v2/report/order/expiring \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/report/order/expiring"

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/report/order/expiring"

	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/report/order/expiring',
  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
{
  "expiring_orders": [
    {
      "days_expiring": 90,
      "order_count": 10
    },
    {
      "days_expiring": 60,
      "order_count": 13
    },
    {
      "days_expiring": 30,
      "order_count": 3
    },
    {
      "days_expiring": -7,
      "order_count": 1
    }
  ]
}

URL 查询字符串

名称 请求/选项 类型 描述
container_id 可选 int 将结果限制为特定容器。

响应参数

名称 类型 描述
expiring_orders array 请求返回的即将到期的订单的列表。
.. days_expiring int 证书到期的剩余天数。
可能的值:90,60,30,-7(在过去 7 天内到期的证书)
.. order_count int days_expiring 类别的证书的数量。