在 DigiCert 撤銷憑證前,必須由系統管理員核准所有撤銷要求。此核准步驟是必需的,而且不可略過。
使用此端點提交要求以撤銷訂單上的單一憑證。
如果您要提交要求以撤銷整份訂單,請使用撤銷訂單憑證端點。
無法撤銷有擱置的重新發行訂單的憑證。若要撤銷有擱置的重新發行的憑證,請取消重新發行要求,或在完成重新發行後撤銷憑證。
curl -X PUT \
'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/revoke' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"comments": "I no longer need this cert."
}'
import requests
url = "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/revoke"
payload = "{\n \"comments\": \"I no longer need this cert.\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("PUT", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/revoke"
payload := strings.NewReader("{\n \"comments\": \"I no longer need this cert.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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: 'PUT',
url: 'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/revoke',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body: { comments: 'I no longer need this cert.' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 1,
"date": "2016-02-10T17:06:15+00:00",
"type": "revoke",
"status": "pending",
"requester": {
"id": 14,
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@digicert.com"
},
"comments": "I no longer need this cert."
}
名稱 | 必填/選填 | 類型 | 說明 |
---|---|---|---|
comments | 選填 | string | 與撤銷要求有關的訊息。 |
名稱 | 類型 | 說明 |
---|---|---|
id | int | 要求 ID。 |
date | string |
提交要求時的時間戳記。 格式:UTC 時區和 ISO 8601 日期 |
type | string |
要求類型: 可能的值: revoke
|
status | string |
撤銷要求的狀態。 可能的值: submitted ,pending ,approved ,rejected
|
requester | object |
與提出要求的使用者有關的詳細資料。 請參閱結構 — 使用者詳細資料物件。 |
comments | string | 與撤銷要求有關的訊息。 |