are downloaded by POSTing XML to a URL rather than defining them using a SOAP service; therefore they have no WSDL document to describe the XML payload. To ensure that your ReportDefinition XML is valid when sending it to the API, we are now publishing an XML Schema Definition (XSD).
There are
many tools to use to validate XML against an XSD. Here we will show how to use the common command-line tool
xmllint to validate against the XSD. First, download the
reportDefinition.xsd to a working directory. Next, save some ReportDefinition XML to a file, such as reportDefinition.xml:
<reportDefinition xmlns="https://adwords.google.com/api/adwords/cm/v201109">
<selector>
<fields>CampaignId</fields>
<fields>Id</fields>
<fields>Impressions</fields>
<fields>Clicks</fields>
<fields>Cost</fields>
<predicates>
<field>Status</field>
<operator>IN</operator>
<values>ENABLED</values>
<values>PAUSED</values>
</predicates>
</selector>
<reportName>Custom Adgroup Performance Report</reportName>
<reportType>ADGROUP_PERFORMANCE_REPORT</reportType>
<dateRangeType>LAST_7_DAYS</dateRangeType>
<downloadFormat>CSV</downloadFormat>
</reportDefinition>
Now run the following command from the directory you placed these two files in:
$ xmllint --schema reportDefinition.xsd reportDefinition.xml
[xml omitted]
reportDefinition.xml validates
This step verifies that your ReportDefinition XML is well-formed for use with the AdWords API report downloads.
If you have any questions, please post on
the forum or attend one of the
AdWords API Office Hours Hangouts.