列出证书备注

GET
https://www.digicert.com/services/v2/certificate/{{certificate_id}}/note

使用此端点列出附加到证书的备注。

cURL
curl -X GET \
  'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/note' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/note"

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

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

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/note"

	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/certificate/{{certificate_id}}/note',
  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
{
  "notes": [
    {
      "date_created": "2019-02-05T21:34:42+00:00",
      "text": "Note text.",
      "user": {
        "id": 123,
        "first_name": "Locke",
        "last_name": "Cole",
        "email": "lock.cole@example.com"
      }
    }
  ]
}

响应参数

名称 类型 描述
notes array 证书备注的列表。
.. date_created string 创建备注的时间戳。
格式:UTC 时区和 ISO 8601 日期
.. text string 备注消息文本。
.. user object 添加备注的用户的相关详细信息。
.. .. id int 用户 ID。
.. .. first_name string 用户的名字。
.. .. last_name string 用户的姓氏。
.. .. email string 用户的电子邮件地址。