仅当您要吊销与订单关联的所有证书时使用此端点。要吊销单个证书,请使用吊销证书端点。
使用此端点提交吊销订单上的所有证书的请求。
在提交请求后,管理员需批准请求后,DigiCert 才能吊销证书。
curl -X PUT \
'https://www.digicert.com/services/v2/order/certificate/{{order_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/order/certificate/{{order_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/order/certificate/{{order_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/order/certificate/{{order_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": 242140,
"first_name": "Jack",
"last_name": "White",
"email": "j.white@fakeaddy.com"
},
"comments": "Revoked via API!"
}
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
comment | 必填 | string | 描述吊销请求的理由的消息。 |
名称 | 类型 | 描述 |
---|---|---|
id | int | 请求编号。 |
date | string |
提交吊销请求的时间戳。 格式:UTC 时区和 ISO 8601 日期 |
type | string |
请求类型。 可能的值: revoke
|
status | string |
吊销请求的状态。 可能的值: submitted ,pending ,approved ,rejected
|
.. requester | object |
提交请求的用户的相关详细信息。 请参阅结构 - 用户详细信息对象。 |
comments | string | 有关吊销请求的消息。 |