Expiration des certificats

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

Use this endpoint to get the number of certificates in your account that:

  • Expire within 0-30, 30-60, and 60-90 days of now.
  • Expired within the last 7 days.

For Multi-year Plan orders, we include the order in the count instead of the certificate if:

  • The order expiration date is within the -7 to 90 day range.
  • There are no certificates on the order that expire within the -7 to 90 day range.
  • The order is not renewed.

The "now" in all expiring certificate categories is the day you submit the Expiring certificates request.

For example, if you submit a request on September 3, "now" is September 3. The API returns the number of certificates that:

  • Expire 0-30, 30-60, and 60-90 days from September 3.
  • Expired in the last 7 days (August 28 – September 3).

Expiring certificate categories

In the JSON response, each object in the expiring_orders array contains an order_count parameter. This parameter returns the number of certificates that expire in a certain timeframe (days_expiring) from the time you submit the request.

days_expiring Days until certificate expiration
90 Between 60 (inclusive) and 90 (inclusive)
60 Between 30 (inclusive) and 60 (exclusive)
30 Between now (exclusive) and 30 (exclusive)
-7 Between now (inclusive) and 7 days ago (inclusive)

Example requests and responses

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 query strings

Name Req/Opt Type Description
container_id optional int Limit results to a specific container.

Response parameters

Name Type Description
expiring_orders array List of objects with the number of certificates in each expiring certificate category.
.. days_expiring integer Number of days until certificate expiration.
Possible values: See Expiring certificate categories
.. order_count integer Number of certificates in the expiring certificate category.