取得 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 尋找 report-run-identifier。

回應參數

名稱 類型 說明
Account ID string 帳戶 ID。
Additional Emails string 與帳戶關聯的電郵。
Alternative Order ID string 與任何替代訂單關聯的 ID。
Auto Renew boolean 帳戶是否設定為自動續訂。
Billing Address City string 帳戶的帳單地址的城市名稱。
Billing Address Country string 帳戶的帳單地址的國家名稱。