狀態變更清單

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

使用此端點列出在指定時段有變更狀態的訂單。

若總分鐘數超過 10080 分鐘 (7 天),則傳回 time_frame_too_long 錯誤。

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 查詢字串

您必須在要求中納入至少一個 URL 查詢字串篩選器。

名稱 必填/選填 類型 說明
minutes 選填 int 限制結果為最後 n 分鐘內的狀態變更。
最大:10080
seconds 選填 int 新增到查詢時間的秒數。
篩選器[status_last_updated] 選填 日期 限制結果為特定日期範圍內的狀態變更。
格式:{{yyyy-MM-dd}}+{{HH:mm:ss}}...{{yyyy-MM-dd}}+{{HH:mm:ss}}
範例: 2019-08-01+00:00:00...2019-08-07+23:59:59

回應參數

名稱 類型 說明
orders array 在指定時段內有狀態變更的訂單的清單。
.. order_id int 訂單 ID。
.. certificate_id int 憑證 ID。
.. status string 目前的訂單狀態。
請參閱詞彙 — 訂單狀態