请求摘要

GET
https://www.digicert.com/services/v2/report/request

使用此端点获取您的帐户的总请求数量和各类型的请求数量。

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

url = "https://www.digicert.com/services/v2/report/request"

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

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

print(response.text)
Go
package main

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

func main() {

	url := "https://www.digicert.com/services/v2/report/request"

	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/report/request',
  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
{
  "request": {
    "total": 17,
    "types": [
      {
        "type": "new_request",
        "request_count": 7
      },
      {
        "type": "revoke",
        "request_count": 4
      },
      {
        "type": "duplicate",
        "request_count": 5
      },
      {
        "type": "reissue",
        "request_count": 1
      }
    ]
  }
}

URL 查询字符串

名称 请求/选项 类型 描述
container_id 可选 int 将结果限制为特定容器。

响应参数

名称 类型 描述
request object 待处理的请求的列表。
.. total int 待处理的请求总数量。
.. types array 按请求类型分类的待处理的请求的列表。
.. .. type string 请求类型。
可能的值:new_request,revoke,duplicate,reissue
.. .. request_count int 指定类型的请求的数量。