Google app audit API

37 views
Skip to first unread message

jahnavi patel

unread,
Jul 30, 2012, 10:23:33 AM7/30/12
to google-app...@googlegroups.com
Hi,
   I am trying to retrieve the total number of files in the google mailbox using the audit API for all the users of an administrator account. How can I get access to ALL MAILS including the ones in the archived folder in my mbox file after I get the export URL? 

Currently when I am creating a request I have the following code in place:

MailBoxDumpRequest request = new MailBoxDumpRequest();

      request.setAdminEmailAddress(adminEmail);

      //c.add(Calendar.MONTH, -1);

      request.setEndDate(c.getTime());

      //c.add(Calendar.MONTH, -1);

      //request.setBeginDate(c.getTime());


      request.setPackageContent("FULL_MESSAGE");

      request.setIncludeDeleted(false);

      request.setUserEmailAddress(user + "@" + domain);


      LOGGER.log(Level.INFO, "\n-------------createMailboxDumpRequest-------------");

      sampleEntry = service.createMailboxDumpRequest(request);

      LOGGER.log(Level.INFO, "\nCreated request - " + sampleEntry.getAllProperties().toString());

      String createdId = sampleEntry.getProperty("requestId");


      LOGGER.log(Level.INFO, "\n-------------retrieveMailboxDumpRequest-------------");

      sampleEntry = service.retrieveMailboxDumpRequest(user, createdId);

      LOGGER.log(Level.INFO, "\nRetrieved dump request - "

          + sampleEntry.getAllProperties().toString()); 

This retrieves all the mails but sometimes it returns 2 urls for the export list. Also I am not able to get a hold of all the emails. 


My questions are as follows:

1. How can I get the exactly all the mails from the ALL MAILS folder? Is there any special property that needs to be set????

2. Why does it return 2 urls? - I assumed the answer to this would be - It returns 2 urls for 2 users. I have 2 users under my control in the admin account.

Could someone please clarify this????

Reply all
Reply to author
Forward
0 new messages