Google 디스플레이 및 동영상 360 UI 또는
API에 액세스할 수 있습니다. 예를 들어 최종 사용자는 어제의 일일 방문 시간을 보여주는 일일 보고서를
총지출을 보여주는 월별 보고서를 볼 수 있습니다.
정기 보고서 작성
Display &Video 360에서 새 예약 보고서를 만들고 Video 360 보고 인터페이스 또는
queries.create API 메서드 사용 자세한 내용은 다음 페이지를 참고하세요.
디스플레이 및 동영상 360의 보고 기능과 새 보고서를 만드는 방법은
Display & Video 360 지원 사이트를 참조하세요.
보고서 생성 시 UI의 Repeats 필드를 사용하여 보고서를 예약할 수 있습니다.
schedule 필드에 표시됩니다. 이러한 필드는
적절한 시간 간격을 두어야 합니다
적절한 필드가 설정되면 해당 일정으로 보고서가 실행되고
생성된 보고서를 다운로드할 수 있습니다.
예약된 보고서 액세스
정기 보고서는 간단한 CSV 파일로 생성되며 자동으로 저장됩니다.
Google Cloud Storage에서 안전하게
저장할 수 있습니다 하지만
이러한 파일이 직접 포함된 Google Cloud Storage 버킷입니다. 대신
파일은 Display &Video 360에서 수동으로 다운로드할 수 있으며 Video 360 UI 또는 검색
Google에서 얻은 사전 승인된 URL을 프로그래매틱 방식으로 사용하여
생성합니다.
longqueryId=query-id;// Call the API, listing the reports under the given queryId from most to// least recent.ListReportsResponsereportListResponse=service.queries().reports().list(queryId).setOrderBy("key.reportId desc").execute();// Iterate over returned reports, stopping once finding a report that// finished generating successfully.ReportmostRecentReport=null;if(reportListResponse.getReports()!=null){for(Reportreport:reportListResponse.getReports()){if(report.getMetadata().getStatus().getState().equals("DONE")){mostRecentReport=report;break;}}}else{System.out.format("No reports exist for query Id %s.\n",queryId);}// Download report file of most recent finished report found.if(mostRecentReport!=null){// Retrieve GCS URL from report object.GenericUrlreportUrl=newGenericUrl(mostRecentReport.getMetadata().getGoogleCloudStoragePath());// Build filename.Stringfilename=mostRecentReport.getKey().getQueryId()+"_"+mostRecentReport.getKey().getReportId()+".csv";// Download the report file.try(OutputStreamoutput=newFileOutputStream(filename)){MediaHttpDownloaderdownloader=newMediaHttpDownloader(Utils.getDefaultTransport(),null);downloader.download(reportUrl,output);}System.out.format("Download of file %s complete.\n",filename);}else{System.out.format("There are no completed report files to download for query Id %s.\n",queryId);}
query_id=query-id# Call the API, listing the reports under the given queryId from most to# least recent.response=service.queries().reports().list(queryId=query_id,orderBy="key.reportId desc").execute()# Iterate over returned reports, stopping once finding a report that# finished generating successfully.most_recent_report=Noneifresponse['reports']:forreportinresponse['reports']:ifreport['metadata']['status']['state']=='DONE':most_recent_report=reportbreakelse:print('No reports exist for query Id %s.'%query_id)# Download report file of most recent finished report found.ifmost_recent_report!=None:# Retrieve GCS URL from report object.report_url=most_recent_report['metadata']['googleCloudStoragePath']# Build filename.output_file='%s_%s.csv'%(report['key']['queryId'],report['key']['reportId'])# Download the report file.withopen(output_file,'wb')asoutput:withclosing(urlopen(report_url))asurl:output.write(url.read())print('Download of file %s complete.'%output_file)else:print('There are no completed report files to download for query Id %s.'%query_id)
PHP
$queryId = query-id;// Call the API, listing the reports under the given queryId from most to// least recent.$optParams = array('orderBy' => "key.reportId desc");$response = $service->queries_reports->listQueriesReports($queryId, $optParams);// Iterate over returned reports, stopping once finding a report that// finished generating successfully.$mostRecentReport = null;if (!empty($response->getReports())) { foreach ($response->getReports() as $report) { if ($report->metadata->status->state == "DONE") { $mostRecentReport = $report; break; } }} else { printf('<p>No reports exist for query ID %s.</p>', $queryId);}// Download report file of most recent finished report found.if ($mostRecentReport != null) { // Build filename. $filename = $mostRecentReport->key->queryId . '_' . $mostRecentReport->key->reportId . '.csv'; // Download the report file. file_put_contents($filename, fopen($mostRecentReport->metadata->googleCloudStoragePath, 'r')); printf('<p>Download of file %s complete.</p>', $filename);} else { printf('<p>There are no completed report files to download for query Id %s.</p>', $queryId);}
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eYou can schedule reports using the Display & Video 360 UI or the API to automate report generation based on desired intervals.\u003c/p\u003e\n"],["\u003cp\u003eAccess and download scheduled Display & Video 360 reports, stored as CSV files in Google Cloud Storage, through the UI or programmatically via pre-authorized URLs.\u003c/p\u003e\n"],["\u003cp\u003eThe provided code samples demonstrate retrieving the most recent report and downloading it locally using the Display & Video 360 API in Java, Python, and PHP.\u003c/p\u003e\n"]]],["Reports in Google Display & Video 360 can be created and scheduled via the UI or API, using fields like `Repeats` or `schedule` to define the time interval. Generated CSV reports are stored in Google Cloud Storage. To access reports, users can manually download them from the UI or programmatically retrieve them using pre-authorized URLs obtained from the API. The API method `queries.reports.list` can be used to find the most recent report, and `Report.reportMetadata.googleCloudStoragePath` to get the file path for download.\n"],null,["# Create and Access Scheduled Reports\n\nYou can create and schedule reports using the Google Display \\& Video 360 UI or the\nAPI. For example, end users can set up a daily report showing yesterday's\nimpressions, or a monthly report showing total spend.\n| **Note:** Accessing reports using this approach only allows for read-only retrieval of reports that have already been set up in the Display \\& Video 360 UI; it does not provide any opportunity to modify existing reports or create new reports.\n\nCreate Scheduled Reports\n------------------------\n\nCreate a new scheduled report in the Display \\& Video 360 reporting interface or\nwith the [`queries.create`](/bid-manager/reference/rest/v2/queries/create) API method. Full details on\nDisplay \\& Video 360's reporting functionality and how to create new reports can be\nfound in the [Display \\& Video 360 support site](//support.google.com/displayvideo/answer/6375151).\n\nReports can be scheduled at creation using the `Repeats` field in the UI and the\n[`schedule`](/bid-manager/reference/rest/v2/queries#Query.FIELDS.schedule) field in the API. These fields should be set to an\nappropriate time interval.\n\nAfter the proper field has been set, this report will run at that schedule and\nthe generated reports will then be available for download.\n\nAccess Scheduled Reports\n------------------------\n\nScheduled reports are generated as simple CSV files and are stored automatically\nand securely in Google Cloud Storage. It isn't possible, however, to access the\nGoogle Cloud Storage buckets which contain these files directly. Instead, the\nfiles may be manually downloaded from the Display \\& Video 360 UI or retrieved\nprogrammatically using [pre-authorized URLs](/bid-manager/reference/rest/v2/queries.reports#ReportMetadata.FIELDS.google_cloud_storage_path) obtained from\nthe API.\n\nAn example of using the API to download a report file is provided below. In this\nexample, [`queries.reports.list`](/bid-manager/reference/rest/v2/queries.reports/list) is used with the\n[`orderBy`](/bid-manager/reference/rest/v2/queries.reports/list#body.QUERY_PARAMETERS.order_by) parameter to retrieve the most recent report\nunder a query. Then the\n[`Report.reportMetadata.googleCloudStoragePath`](/bid-manager/reference/rest/v2/queries.reports#ReportMetadata.FIELDS.google_cloud_storage_path) field is\nused to locate the report file and download its contents to a local CSV file. \n\n### Java\n\nRequired imports: \n\n```java\nimport com.google.api.client.googleapis.media.MediaHttpDownloader;\nimport com.google.api.client.googleapis.util.Utils;\nimport com.google.api.client.http.GenericUrl;\nimport com.google.api.services.doubleclickbidmanager.DoubleClickBidManager;\nimport com.google.api.services.doubleclickbidmanager.model.ListReportsResponse;\nimport com.google.api.services.doubleclickbidmanager.model.Report;\nimport java.io.FileOutputStream;\nimport java.io.OutputStream;\n```\n\nCode example: \n\n```java\nlong queryId = query-id;\n\n// Call the API, listing the reports under the given queryId from most to\n// least recent.\nListReportsResponse reportListResponse =\n service\n .queries()\n .reports()\n .list(queryId)\n .setOrderBy(\"key.reportId desc\")\n .execute();\n\n// Iterate over returned reports, stopping once finding a report that\n// finished generating successfully.\nReport mostRecentReport = null;\nif (reportListResponse.getReports() != null) {\n for (Report report : reportListResponse.getReports()) {\n if (report.getMetadata().getStatus().getState().equals(\"DONE\")) {\n mostRecentReport = report;\n break;\n }\n }\n} else {\n System.out.format(\"No reports exist for query Id %s.\\n\", queryId);\n}\n\n// Download report file of most recent finished report found.\nif (mostRecentReport != null) {\n // Retrieve GCS URL from report object.\n GenericUrl reportUrl =\n new GenericUrl(mostRecentReport.getMetadata().getGoogleCloudStoragePath());\n\n // Build filename.\n String filename =\n mostRecentReport.getKey().getQueryId() + \"_\"\n + mostRecentReport.getKey().getReportId() + \".csv\";\n\n // Download the report file.\n try (OutputStream output = new FileOutputStream(filename)) {\n MediaHttpDownloader downloader =\n new MediaHttpDownloader(Utils.getDefaultTransport(), null);\n downloader.download(reportUrl, output);\n }\n System.out.format(\"Download of file %s complete.\\n\", filename);\n} else {\n System.out.format(\n \"There are no completed report files to download for query Id %s.\\n\",\n queryId);\n}\n```\n\n### Python\n\nRequired imports: \n\n```python\nfrom contextlib import closing\nfrom six.moves.urllib.request import urlopen\n```\n\nCode example: \n\n```python\nquery_id = query-id\n\n# Call the API, listing the reports under the given queryId from most to\n# least recent.\nresponse = service.queries().reports().list(queryId=query_id, orderBy=\"key.reportId desc\").execute()\n\n# Iterate over returned reports, stopping once finding a report that\n# finished generating successfully.\nmost_recent_report = None\nif response['reports']:\n for report in response['reports']:\n if report['metadata']['status']['state'] == 'DONE':\n most_recent_report = report\n break\nelse:\n print('No reports exist for query Id %s.' % query_id)\n\n# Download report file of most recent finished report found.\nif most_recent_report != None:\n # Retrieve GCS URL from report object.\n report_url = most_recent_report['metadata']['googleCloudStoragePath']\n\n # Build filename.\n output_file = '%s_%s.csv' % (report['key']['queryId'], report['key']['reportId'])\n\n # Download the report file.\n with open(output_file, 'wb') as output:\n with closing(urlopen(report_url)) as url:\n output.write(url.read())\n print('Download of file %s complete.' % output_file)\nelse:\n print('There are no completed report files to download for query Id %s.' % query_id)\n```\n\n### PHP\n\n```php\n$queryId = \u003cvar translate=\"no\"\u003equery-id\u003c/var\u003e;\n\n// Call the API, listing the reports under the given queryId from most to\n// least recent.\n$optParams = array('orderBy' =\u003e \"key.reportId desc\");\n$response = $service-\u003equeries_reports-\u003elistQueriesReports($queryId, $optParams);\n\n// Iterate over returned reports, stopping once finding a report that\n// finished generating successfully.\n$mostRecentReport = null;\nif (!empty($response-\u003egetReports())) {\n foreach ($response-\u003egetReports() as $report) {\n if ($report-\u003emetadata-\u003estatus-\u003estate == \"DONE\") {\n $mostRecentReport = $report;\n break;\n }\n }\n} else {\n printf('\u003cp\u003eNo reports exist for query ID %s.\u003c/p\u003e', $queryId);\n}\n\n// Download report file of most recent finished report found.\nif ($mostRecentReport != null) {\n // Build filename.\n $filename = $mostRecentReport-\u003ekey-\u003equeryId . '_' . $mostRecentReport-\u003ekey-\u003ereportId . '.csv';\n\n // Download the report file.\n file_put_contents($filename, fopen($mostRecentReport-\u003emetadata-\u003egoogleCloudStoragePath, 'r'));\n printf('\u003cp\u003eDownload of file %s complete.\u003c/p\u003e', $filename);\n} else {\n printf('\u003cp\u003eThere are no completed report files to download for query Id %s.\u003c/p\u003e', $queryId);\n}\n```"]]