狀態變更清單

GET
https://www.digicert.com/services/v2/order/certificate/status-changes

Use this endpoint to list orders that had a changed status in the specified time period.

If the total time in minutes exceeds 10080 minutes (7 days), a time_frame_too_long error is returned.

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/order/certificate/status-changes?minutes=10' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/order/certificate/status-changes"

querystring = {"minutes":"10"}

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

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

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/order/certificate/status-changes?minutes=10"

	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/order/certificate/status-changes',
  qs: { minutes: '10' },
  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
{
  "orders": [
    {
      "order_id": 265,
      "certificate_id": 112233,
      "status": "issued"
    },
    {
      "order_id": 264,
      "certificate_id": 112232,
      "status": "canceled"
    },
    {
      "order_id": 263,
      "certificate_id": 112231,
      "status": "issued"
    },
    {
      "order_id": 262,
      "certificate_id": 112230,
      "status": "rejected"
    },
    {
      "order_id": 261,
      "certificate_id": 112229,
      "status": "issued"
    },
    {
      "order_id": 260,
      "certificate_id": 112228,
      "status": "issued"
    },
    {
      "order_id": 259,
      "certificate_id": 112227,
      "status": "issued"
    }
  ]
}
200 OK (no orders found)
{}
400 Bad Request
{
  "errors": [
    {
      "code": "time_frame_too_long",
      "message": "An error occurred while processing your request."
    }
  ]
}

URL query strings

You must include at least one URL query string filter in your request.

Name Req/Opt Type Description
minutes optional int Limit results to status changes within the last n minutes.
Max: 10080
seconds optional int Seconds to add to the query time.
filters[status_last_updated] optional date Limit results to status changes within the specific date range.
Format: {{yyyy-MM-dd}}+{{HH:mm:ss}}...{{yyyy-MM-dd}}+{{HH:mm:ss}}
Example: 2019-08-01+00:00:00...2019-08-07+23:59:59

Response parameters

Name Type Description
orders array List of orders with status changes in the specified time period.
.. order_id int Order ID.
.. certificate_id int Certificate ID.
.. status string Current order status.
See Glossary – Order status