public interface ReportServiceInterface
ReportJob and retrieving performance
and statistics about ad campaigns, networks, inventory and sales.
Follow the steps outlined below:
ReportJob object by invoking
ReportService#runReportJob.ReportJob object using
ReportService#getReportJob.ReportJob object until the
ReportJob#reportJobStatus field is equal to
ReportJobStatus.COMPLETED or ReportJobStatus.FAILED.ReportService#getReportDownloadURL.
The networks created using NetworkService#makeTestNetwork are unable
to provide reports that would be comparable to the production environment
because reports require traffic history.
In the test networks, reports will consistently return no data for all reports.
| Modifier and Type | Method and Description |
|---|---|
String |
getReportDownloadURL(Long reportJobId,
ExportFormat exportFormat)
Returns the URL at which the report file can be downloaded.
|
String |
getReportDownloadUrlWithOptions(Long reportJobId,
ReportDownloadOptions reportDownloadOptions)
Returns the URL at which the report file can be downloaded, and allows for customization
of the downloaded report.
|
ReportJobStatus |
getReportJobStatus(Long reportJobId)
Returns the
ReportJobStatus of the report job with the specified ID. |
SavedQueryPage |
getSavedQueriesByStatement(Statement filterStatement)
Retrieves a page of the saved queries either created by or shared with the current user.
|
ReportJob |
runReportJob(ReportJob reportJob)
Initiates the execution of a
ReportQuery on the server. |
@RequestWrapper(localName="getReportDownloadURL", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportDownloadURL") @ResponseWrapper(localName="getReportDownloadURLResponse", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportDownloadURLResponse") String getReportDownloadURL(Long reportJobId, ExportFormat exportFormat) throws ApiException_Exception
The report will be generated as a gzip archive, containing the report file itself.
reportJobId - the ID of the ReportJobexportFormat - the ExportFormat for the report filereportJobId - exportFormat - ApiException_Exception@RequestWrapper(localName="getReportDownloadUrlWithOptions", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportDownloadUrlWithOptions") @ResponseWrapper(localName="getReportDownloadUrlWithOptionsResponse", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportDownloadUrlWithOptionsResponse") String getReportDownloadUrlWithOptions(Long reportJobId, ReportDownloadOptions reportDownloadOptions) throws ApiException_Exception
By default, the report will be generated as a gzip archive, containing the report file itself.
This can be changed by setting ReportDownloadOptions.useGzipCompression to false.
reportJobId - the ID of the ReportJobreportDownloadOptions - the ReportDownloadOptions for the requestreportDownloadOptions - reportJobId - ApiException_Exception@RequestWrapper(localName="getReportJobStatus", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportJobStatus") @ResponseWrapper(localName="getReportJobStatusResponse", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetReportJobStatusResponse") ReportJobStatus getReportJobStatus(Long reportJobId) throws ApiException_Exception
ReportJobStatus of the report job with the specified ID.reportJobId - ApiException_Exception@RequestWrapper(localName="getSavedQueriesByStatement", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetSavedQueriesByStatement") @ResponseWrapper(localName="getSavedQueriesByStatementResponse", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacegetSavedQueriesByStatementResponse") SavedQueryPage getSavedQueriesByStatement(Statement filterStatement) throws ApiException_Exception
SavedQuery in the page, if it is compatible with the current API version, will
contain a ReportQuery object which can be optionally modified and used to create a
ReportJob. This can then be passed to ReportService#runReportJob.
The following fields are supported for filtering:
| PQL Property | Object Property |
|---|---|
id |
SavedQuery.id |
name |
SavedQuery.name |
filterStatement - a Publisher Query Language statement used to filter which saved queries
should be returned.filterStatement - SavedQueryPage that contains all SavedQuery instances which satisfy
the given statement.ApiException_Exception@RequestWrapper(localName="runReportJob", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacerunReportJob") @ResponseWrapper(localName="runReportJobResponse", targetNamespace="https://www.google.com/apis/ads/publisher/v201805", className="com.google.api.ads.dfp.jaxws.v201805.ReportServiceInterfacerunReportJobResponse") ReportJob runReportJob(ReportJob reportJob) throws ApiException_Exception
ReportQuery on the server.
The following fields are required:
reportJob - the report job to runreportJob - ApiException_ExceptionCopyright © 2018. All Rights Reserved.