获取 JSON 报告

GET
https://api.digicert.com/reports/v1/report/{{report_identifier}}/{{report_run_identifier}}/json

使用此端点显示 JSON 格式的报告。

必须在帐户中启用报告库功能,该端点才能成功响应。

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

url = "/reports/preview/report/{{report-identifier}}/{{report-run-identifier}}/json"

payload="curl -X GET \\\r\n  'https://www.digicert.com/services/v2/report/preview/report/{{report_identifier}}/{{report-run-identifier}}/json}' \\\r\n  -H 'Content-Type: application/json' \\\r\n  -H 'X-DC-DEVKEY: B35MZV2NEYT6KJM4WRXAL3TTKKFGGY6SXZOLSPZPLGYACGYQJFYNHRNHCKVT6PZULBLC4ECGGRV22KHEQ'"
headers = {
  'Content-Type': 'text/plain'
}

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

print(response.text)
Go
package main

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

func main() {

  url := "/reports/preview/report/%7B%7Breport-identifier%7D%7D/%7B%7Breport-run-identifier%7D%7D/json"
  method := "GET"

  payload := strings.NewReader(`curl -X GET \`+"
"+`
  'https://www.digicert.com/services/v2/report/preview/report/{{report_identifier}}/{{report-run-identifier}}/json}' \`+"
"+`
  -H 'Content-Type: application/json' \`+"
"+`
  -H 'X-DC-DEVKEY: B35MZV2NEYT6KJM4WRXAL3TTKKFGGY6SXZOLSPZPLGYACGYQJFYNHRNHCKVT6PZULBLC4ECGGRV22KHEQ'`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "text/plain")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
NodeJS
var request = require('request');
var options = {
  'method': 'GET',
  'url': '/reports/preview/report/{{report-identifier}}/{{report-run-identifier}}/json',
  'headers': {
    'Content-Type': 'text/plain'
  },
  body: 'curl -X GET \\\r\n  \'https://www.digicert.com/services/v2/report/preview/report/{{report_identifier}}/{{report-run-identifier}}/json}\' \\\r\n  -H \'Content-Type: application/json\' \\\r\n  -H \'X-DC-DEVKEY: B35MZV2NEYT6KJM4WRXAL3TTKKFGGY6SXZOLSPZPLGYACGYQJFYNHRNHCKVT6PZULBLC4ECGGRV22KHEQ\''

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
200 OK
[
    {
        "Account ID": 9500650,
        "Additional Emails": null,
        "Alternative Order ID": null,
        "Auto Renew": "No",
        "Billing Address City": "SARATOGA SPRINGS",
        "Billing Address Country": "us",
    }
]

路径参数

名称 请求/选项 类型 描述
report-identifier 必填 string 创建报告 API响应中显示的报告 ID。
report-run-identifier 必填 string 与预约报告相关的 ID。使用报告历史记录 API 查找报告运行标识符。

响应参数

名称 类型 描述
Account ID string 帐号。
Additional Emails string 与帐户关联的电子邮件地址。
Alternative Order ID string 与任何备选订单关联的 ID。
Auto Renew boolean 是否对帐户设置自动续订。
Billing Address City string 帐户帐单地址所在的城市名。
Billing Address Country string 帐户帐单地址所在的国家/地区名。