使用此端點透過提供報告 ID 以傳回與報告有關的資訊。
若要讓此端點成功回應,您必須在您的帳戶中啟用「報告程式庫」功能。
curl -X GET \
'https://www.digicert.com/services/v2/reports/preview/report/{{report_identifier}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}"
payload={}
headers = {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
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))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}',
'headers': {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"report": {
"report_display_name": "RPT01",
"report_identifier": "b80de6e4-f085-4488-a47f-b7b5ea07e05e",
"created_by_user_id": 10192361,
"created_by_user_name": "venkat patil",
"created_date": "2021-01-13 09:43:17",
"report_metadata": {
"columns": [
{
"identifier": "account_id"
},
{
"identifier": "number_of_sans"
},
{
"identifier": "certificate_id"
},
{
"identifier": "certificate_validity_days"
},
{
"identifier": "container_id"
},
{
"identifier": "container_name"
}
],
"report_type": "orders"
},
"schedule": {
"frequency": "WEEKLY", //Possible values ON_DEMAND,WEEKLY,MONTHLY
"weekday_to_run": "WEDNESDAY", // Possible values SUNDAY to SATURDAY, ""
"weekday_frequency": "", // Possible values FIRST, SECOND, THIRD, FOURTH, LAST, ""
"run_until": "2021-12-23"
},
"next_run_date": "2021-01-20",
"format": [
"CSV" // Possible value only CSV
],
"status": "ACTIVE" // Always ACTIVE
}
}
{
"code": "user_authentication_error",
"message": "User is not authenticated."
}
{
"code": "user_forbidden",
"message": "User does not have the required permission."
}
{
"code": "custom_reports_not_enabled",
"message": "Custom reports is not enabled"
}
{
"code": "reports_not_found",
"message": "Report with the given identifier does not exist."
}
404 page not found
名稱 | 必填/選填 | 類型 | 說明 |
---|---|---|---|
report-identifier | 必填 | string | 顯示在建立報告 API 的回應中的報告 ID。 |
名稱 | 類型 | 說明 |
---|---|---|
report | object | 容器。 |
report_display_name | string | 報告的指定名稱。 |
.. report_identifier | string | 顯示在建立報告 API 的回應中的報告 ID。 |
.. created_by_user_id | string | 與建立報告人關聯的使用者 ID。 |
.. created_date | string | 報告的建立日期,包括以下格式的時間戳記:年-月-日 時-分-秒。 |
.. created_by_user_name | string | 與建立報告關聯的使用者名稱。 |
.. report_metadata | object | 容器。 |
.. .. columns | object | 在報中指定的欄類型。 |
.. .. .. identifier | string | 報告程式庫 API 支援的欄識別碼。關於所有支援的欄的清單,請參閱報告程式庫 API 欄。 |
.. .. report_type | string | 報告的類型。 |
.. schedule | object | 容器。 |
.. .. frequency | string |
建立報告的頻率。可能的值:ON_DEMAND, WEEKLY, MONTHLY . 值要區分大小寫。
|
.. .. weekday_to_run | string |
建立報告的一周的日期。可能的值:SUNDAY 到 SATURDAY .值要區分大小寫。
|
.. .. weekday_frequency | string |
每個平日建立報告的次數。可能的值: FIRST , SECOND , THIRD , FOURTH , LAST . 值要區分大小寫。
|
.. .. run_until | date | 停止建立此報告的日期。格式:年-月-日。 |
.. next_run_date | date | 繼續建立此報告的日期。格式:年-月-日。 |
.. format | string |
報告的格式。關於此端點,可能的值是 CSV 。若要在 JSON 中傳回報告,請參閱取得 JSON 報告 API。
|
.. status | string |
報告的狀態。所有排程的報告都 ACTIVE 。
|