所有吊销请求必须由管理员批准后,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 | 请求编号。 |
date | string |
提交请求的时间戳。 格式:UTC 时区和 ISO 8601 日期 |
type | string |
请求类型。 可能的值: revoke
|
status | string |
吊销请求的状态。 可能的值: submitted ,pending ,approved ,rejected
|
requester | object |
提交请求的用户的相关详细信息。 请参阅结构 - 用户详细信息对象。 |
comments | string | 有关吊销请求的消息。 |