Hi Anirudh,
 we did it.Now we can fetch all seven reports.Now issue is that we can
generate reports for only one month,by providing detail of date in
<date></date>.Is there is any way to generate yearly report / quaterly
report / or if we specify some criteria like from date to TO Date.If
yes then how,where?? Again thanks for your prompt reply.

On Aug 20, 11:01 am, "Anirudh (Google)" <[EMAIL PROTECTED]> wrote:
> Hi Arkesh,
>
> The latest version of file can be obtained from here (Choose 
> .NET):http://code.google.com/apis/apps/libraries_and_samples.html#reporting
>
> Compiling the source code using the following command will generate
> ReportingAPIClient.exe in your current directory:
> "C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe
> ReportingAPIClient.cs",
>
> You can make sure that your C# compiler i.e. csc.exe is in the
> directory by visiting it.
>
> You can then run the executable passing the commandline arguments:
> c:\reporting\ReportingAPIClient.exe --email [EMAIL PROTECTED] --
> password password --report accounts
>
> These instructions are present in the README file bundled with client
> library download.
>
> Also, not sure if that's the cause of the error but i did notice some
> extra spaces in the URL of namespace declaration:
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> The URL you need to POST to 
> is:https://www.google.com/hosted/services/v1.0/reports/ReportingData
>
> Do not replace anything in the URL.
>
> -Anirudh
>
> On Aug 20, 6:37 pm, Arkesh <[EMAIL PROTECTED]> wrote:
>
> > Hi Anirudh,
> >  Thanks for replying.I appreciate it.
> > I am using Poster add-ons of firefox for sending XML HTTP
> > Request.Intresting thing is that i recieve SID token but when i put
> > this SID token in actual XML Activity report in <token></token> tag it
> > do not works.It just give html codes for Google page.Again i assure
> > that i am putting valid
> > <domain>example.com</domain>
> > <date>YYYY-MM-DD</date>
> > everythig is fine.
> > what you think do i 
> > manipulatehttps://www.google.com/accounts/ClientLoginhttps://www.google.com/hos......
> > address,byhttps://www.google.com/a/example.com/services/v1.0/reports/ReportingData
> > As far as C# file is concerned
> > first i write something like below,
> > C:\Windows\Microsoft.NET\Framework\VERSION\csc.exe
> > then i write
> > C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe
> > ReportingAPIClient.cs
> > it is not asking to take parameters like email,password,domain,token
> > etc.i am pretty sure that i do not have to manipulate given
> > ReportingAPIClient.cs file.In your case if you can run the C# file
> > then can you forward me that particular c# ReportingAPIClient.cs
> > file???
> > Here is the file which i use.
> > ===========
> > /* Copyright (c) 2007 Google Inc.
> >  *
> >  * Licensed under the Apache License, Version 2.0 (the "License");
> >  * you may not use this file except in compliance with the License.
> >  * You may obtain a copy of the License at
> >  *
> >  *    http://www.apache.org/licenses/LICENSE-2.0
> >  *
> >  * Unless required by applicable law or agreed to in writing, software
> >  * distributed under the License is distributed on an "AS IS" BASIS,
> >  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > implied.
> >  * See the License for the specific language governing permissions and
> >  * limitations under the License.
> >  */
>
> > using System;
> > using System.IO;
> > using System.Net;
> > using System.Text;
> > using System.Collections;
> > using System.Web;
>
> > namespace Google.Apps.Reporting
> > {
> >     /// <summary>
> >     /// This contains the logic for constructing and submitting a
> > report
> >     /// request to the Google Apps reporting service and reading the
> > response.
> >     ///
> >     /// The description of the web service protocol can be found at:
> >     ///
> >     
> > ///http://code.google.com/apis/apps/reporting/google_apps_reporting_api....
> >     ///
> >     /// Example usage:
> >     ///   ReportingAPIClient client = new ReportingAPIClient();
> >     ///   client.email = "[EMAIL PROTECTED]";
> >     ///   client.password = "passwd";
> >     ///   client.domain = "example.com";
> >     ///   client.ClientLogin();
> >     /// Get the latest accounts report to standard output.
> >     ///   client.getReport("accounts", null, null);
> >     /// Get the accounts report for May 15, 2007 and save it to
> > out.txt.
> >     ///   client.getReport("accounts", "2007-05-15", "out.txt");
> >     /// </summary>
> >     public class ReportingAPIClient
> >     {
> >         /// <summary>
> >         /// URL to POST to obtain an authentication token
> >         /// </summary>
> >         private const string CLIENT_LOGIN_URL =
> >           "https://www.google.com/accounts/ClientLogin";;
>
> >         /// <summary>
> >         /// URL to POST to retrive resports from the API
> >         /// </summary>
> >         private const string REPORTING_URL =
> >           "https://www.google.com/hosted/services/v1.0/reports/
> > ReportingData";
>
> >         /// <summary>
> >         /// Date format of the API
> >         /// </summary>
> >         private const string DATE_FORMAT = "yyyy-MM-dd";
>
> >         /// <summary>
> >         /// Hour of the day when the API data gets published
> >         /// </summary>
> >         private const int PUBLISH_HOUR_OF_DAY = 13; // Publish hour +
> > 1 hour;
>
> >         /// <summary>
> >         /// Time diference to UTC
> >         /// </summary>
> >         private const int PUBLISH_TIME_DIFERENCE_TO_UTC = -8;
>
> >         /// <summary>
> >         /// Email command-line argument
> >         /// </summary>
> >         private const string EMAIL_ARG = "email";
>
> >         /// <summary>
> >         /// Password command-line argument
> >         /// </summary>
> >         private const string PASSWORD_ARG = "password";
>
> >         /// <summary>
> >         /// Domain command-line argument
> >         /// </summary>
> >         private const string DOMAIN_ARG = "domain";
>
> >         /// <summary>
> >         /// Report command-line argument
> >         /// </summary>
> >         private const string REPORT_ARG = "report";
>
> >         /// <summary>
> >         /// Date command-line argument
> >         /// </summary>
> >         private const string DATE_ARG = "date";
>
> >         /// <summary>
> >         /// Output File command-line argument
> >         /// </summary>
> >         private const string OUT_FILE_ARG = "out";
>
> >         /// <summary>
> >         /// Message for command-line usage
> >         /// </summary>
> >         private const string USAGE = "Usage:  " +
> >           "ReportingAPI --" + EMAIL_ARG + " <email> --" +
> >           PASSWORD_ARG + " <password> [ --" +
> >           DOMAIN_ARG + " <domain> ] --" +
> >           REPORT_ARG + " <report name> [ --" +
> >           DATE_ARG + " <YYYY-MM-DD> ] [ --" +
> >           OUT_FILE_ARG + " <file name> ]";
>
> >         /// <summary>
> >         /// List of command-line arguments
> >         /// </summary>
> >         private static string[] PROPERTY_NAMES = new String[]
> > {EMAIL_ARG,
> >           PASSWORD_ARG, DOMAIN_ARG, REPORT_ARG, DATE_ARG,
> > OUT_FILE_ARG};
>
> >         /// <summary>
> >         /// List of required command-line arguments
> >         /// </summary>
> >         private static string[] REQUIRED_PROPERTY_NAMES = new String[]
> > {
> >           EMAIL_ARG, PASSWORD_ARG, REPORT_ARG};
>
> >         /// <summary>
> >         /// Google Apps Domain
> >         /// </summary>
> >         public string domain = null;
>
> >         /// <summary>
> >         /// Email address of an Administrator account
> >         /// </summary>
> >         public string email = null;
>
> >         /// <summary>
> >         /// Password of the Administrator account
> >         /// </summary>
> >         public string password = null;
>
> >         /// <summary>
> >         /// Identifies the type of account
> >         /// </summary>
> >         private string accountType = "HOSTED";
>
> >         /// <summary>
> >         /// Identifies the Google service
> >         /// </summary>
> >         private string service = "apps";
>
> >         /// <summary>
> >         /// Contains a token value that Google uses to authorize
> >         /// access to the requested report data
> >         /// </summary>
> >         private string token = null;
>
> >         /// <summary>
> >         /// Default constructor
> >         /// </summary>
> >         public ReportingAPIClient()
> >         {
> >         }
>
> >         /// <summary>
> >         /// Retrieves the Authentication Token
> >         /// </summary>
> >         /// <returns>Returns the authentication token.</returns>
> >         public string GetToken()
> >         {
> >             return this.token;
> >         }
>
> >         /// <summary>
> >         /// Logs in the user and initializes the Token
> >         /// </summary>
> >         public void ClientLogin()
> >         {
> >             string token = null;
> >             UTF8Encoding encoding = new UTF8Encoding();
> >             string postData = "Email=" +
> > HttpUtility.UrlEncode(this.email) +
> >               "&Passwd=" + HttpUtility.UrlEncode(this.password) +
> >               "&accountType=" +
> > HttpUtility.UrlEncode(this.accountType) +
> >               "&service=" + HttpUtility.UrlEncode(this.service);
> >             byte[] data = encoding.GetBytes(postData);
> >             HttpWebRequest request =
> >               (HttpWebRequest)WebRequest.Create(CLIENT_LOGIN_URL);
> >             request.Method = "POST";
> >             request.ContentType = "application/x-www-form-urlencoded";
> >             request.ContentLength = data.Length;
> >             Stream inputStream = request.GetRequestStream();
> >             inputStream.Write(data, 0, data.Length);
> >             inputStream.Close();
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to