Use this endpoint to get the number of certificates in your account that:
For Multi-year Plan orders, we include the order in the count instead of the certificate if:
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:
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) |
curl -X GET \
https://www.digicert.com/services/v2/report/order/expiring \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
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)
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))
}
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);
});
{
"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
}
]
}
Name | Req/Opt | Type | Description |
---|---|---|---|
container_id | optional | int | Limit results to a specific container. |
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. |