Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Sie können Berichte erstellen und planen, indem Sie die Video 360-UI oder die
der API erstellen. Zum Beispiel können Endnutzer einen täglichen Bericht einrichten, der die Daten von gestern
Impressionen oder einen monatlichen Bericht mit den Gesamtausgaben.
Geplante Berichte erstellen
Erstellen Sie einen neuen geplanten Bericht in der Ansicht "Display &Video 360 Video 360-Berichtsoberfläche oder
mit der API-Methode queries.create. Alle Details zu
Display- und Die Berichterstellungsfunktionen und die Erstellung neuer Berichte von Video 360 können
auf der Seite Display- und Video 360-Supportwebsite
Sie können Berichte bei der Erstellung planen. Verwenden Sie dazu das Feld Repeats in der Benutzeroberfläche und die
schedule. Für diese Felder sollte ein
entsprechenden Zeitintervall.
Nachdem das entsprechende Feld festgelegt wurde, wird der Bericht nach diesem Zeitplan erstellt und
stehen die erstellten Berichte zum Download zur Verfügung.
Auf geplante Berichte zugreifen
Geplante Berichte werden als einfache CSV-Dateien generiert und automatisch gespeichert
und sicher in Google Cloud Storage speichern. Es ist jedoch nicht möglich, auf die
Google Cloud Storage-Buckets, die diese Dateien direkt enthalten. Stattdessen
können Dateien manuell aus dem Display & Video 360-UI oder abgerufen
mithilfe von vorautorisierten URLs, die von
die API verwenden.
Unten sehen Sie ein Beispiel für die Verwendung der API zum Herunterladen einer Berichtsdatei. In dieser
Beispiel: queries.reports.list wird mit dem Parameter
orderBy-Parameter, um den neuesten Bericht abzurufen
unter einer Abfrage. Dann
Das Feld Report.reportMetadata.googleCloudStoragePath ist
zum Suchen der Berichtsdatei und zum Herunterladen ihres Inhalts in eine lokale CSV-Datei verwendet wird.
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,["Zuletzt aktualisiert: 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```"]]