Getting blank results back from the Admin Audit API

42 views
Skip to first unread message

Jay Lee

unread,
Jul 11, 2011, 4:11:42 PM7/11/11
to google-app...@googlegroups.com
I'm attempting to work with the Admin Audit API. I believe I have OAuth 2.0 authentication details set as they need to be but no matter what parameters I try, I always get back a nearly empty JSON response. For simplicities sake, I started with the AppEngine Buzz client at:


I made sure it worked for me with Buzz and then I switched it to using the Admin Audit API service. Here's my code changes starting at about line 67 of main.py:

    else:
      http = httplib2.Http()
      http = credentials.authorize(http)
      service = build("audit", "v1", http=http)
      activities = service.activities()
      activitylist = activities.list(applicationId='XXXXXXXX', customerId='XXXXXX').execute()
      self.response.out.write(activitylist)
      #path = os.path.join(os.path.dirname(__file__), 'welcome.html')

all I get back is:

{u'kind': u'audit#activities'}

I've also tried adding actorEmail, startDate and endDate parameters with identical results. I'm sure there has been activity on my test domain that would show up on the report. Could anybody provide a clue as to why this would be blank?

Jay

Jay Lee

unread,
Jul 12, 2011, 1:22:37 PM7/12/11
to google-app...@googlegroups.com
Also, if code samples or session logs are needed, I can of course email them privately.

Thanks,

Jay

Claudio Cherubino

unread,
Jul 12, 2011, 7:50:02 PM7/12/11
to google-app...@googlegroups.com
Hi Jay,

What OAuth scope are you using?

Claudio


Jay

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/mtsc3VIHuCMJ.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Jay Lee

unread,
Jul 12, 2011, 8:03:05 PM7/12/11
to google-app...@googlegroups.com

Claudio Cherubino

unread,
Jul 12, 2011, 8:34:39 PM7/12/11
to google-app...@googlegroups.com
Jay,

I tried your code and managed to retrieve all relevant information for my test domain activities.
Are you using '207535951991' as the applicationId? That is the only id currently supported.

Claudio


Jay

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Jay Lee

unread,
Jul 12, 2011, 8:43:38 PM7/12/11
to google-app...@googlegroups.com
Claudio,

  Thank you! That's what I was missing. I didn't realize Application ID needed to be a set value, I thought I pulled it from my API Console.

Much appreciated,

Jay
Reply all
Reply to author
Forward
0 new messages