이 엔드포인트를 사용하여 보고서를 다운로드합니다. report-identifier
및 report-run-identifier
를 받으려면, 보고서 기록 엔드포인트를 사용합니다.
이 엔드포인트가 응답하려면 계정에 보고서 라이브러리 기능을 사용해야 합니다.
curl -X GET \
'https://www.digicert.com/services/v2/report/{{report-identifier}}/{{report-run-identifier}}download?report_format={{report_format}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v1/report/{{report-identifier}}/{{report-run-identifier}}/download?report_format={{report_format}}"
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/report/{{report-identifier}}/{{report-run-identifier}}/download?report_format={{report_format}}"
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/report/{{report-identifier}}/{{report-run-identifier}}/download?report_format={{report_format}}',
'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);
});
No content
{
"code": "report_format_inapplicable",
"message": "The given report format is not applicable for the template/report."
}
{
"code": "missing_mandatory_fields",
"message": "Please provide values for mandatory fields"
}
{
"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."
}
{
"code": "report_not_found",
"message": "Report with the given identifier does not exist."
}
이름 | 필수/옵션 | 유형 | 설명 |
---|---|---|---|
report-identifier | 필수 | uuid | 보고서 ID입니다. 보고서 기록 API로 보고서 ID를 찾습니다. |
report-run-identifier | 필수 | uuid | 보고서의 일정에 연결된 ID입니다. 보고서 기록 API로 보고서 실행 식별자를 찾습니다. |
이름 | 필수/옵션 | 유형 | 설명 |
---|---|---|---|
report_format | 필수 | string |
다운로드하는 보고서의 형식입니다. 지원되는 형식: CSV, JSON, ZIP .
|
다운로드한 보고서 파일은 "<display_name>-<YYY-MM-DD 형식으로 보고서 다운로드 날짜>.<file_format>로 저장됩니다. 파일 확장명은 보고서 만들기 API의 <code>report_format</code>을 따릅니다.