I'm probably just doing something wrong, but I'm unsure what it is:
I use the ClientLogin Authentication to generate a token, then use the following (in test phase) Perl code to submit a request:
my $lwp = LWP::UserAgent->new;my $xml = <<EOM;<?xml version="1.0" encoding="UTF-8"?><rest xmlns="google:accounts:rest:protocol" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "> <type>Report</type> <token>$auth_token</token> <domain>$domain</domain> <date>2011-08-04</date> <reportType>daily</reportType> <reportName>accounts</reportName></rest>EOMmy $url = 'https://www.google.com/hosted/services/v1.0/reports/ReportingData';$response = $lwp->post($url, 'Content_Type' => 'application/atom+xml; charset=UTF-8', 'Content' => $xml);And the response:
<?xml version="1.0" encoding="UTF-8"?><hs:rest xmlns:hs="google:accounts:rest:protocol">
<hs:status>Failure(2001)</hs:status>
<hs:reason>InternalError(1011)</hs:reason>
<hs:extendedMessage>No extended message available for this error.</hs:extendedMessage>
<hs:result></hs:result>
<hs:type></hs:type>
</hs:rest>Am I required to encode the xml like with standard POSTs? Pass it in with a certain variable name? Or is there possibly an issue right now with the API?
Any/all help is MUCH appreciated.
THANX!
Jason