Hello, I am not sure what I am doing wrong. This code snippet works for the first and second page, but the third page just errors out with Backend Error. Below is the snippet code modified from the sample audit code to loop to get more than two pages (/samples/audit/audit.py). I am using the google-api-python-client-1.0beta8 libraries.
Error: apiclient.errors.HttpError: <HttpError 503 when requesting https://www.googleapis.com/apps/reporting/audit/v1/<CUSTID>/207535951991?alt=json&actorEmail=<USERNAME>%40my.fit.edu&continuationToken=A%3A1332360357259000%3A-6996555965732959864%3A207535951991%3A<CUSTID>%26maxResults%3D1&maxResults=1 returned "Backend Error"> Code: activities = service.activities() # Retrieve the first two activities #print 'Retrieving the first 2 activities...' activity_list = activities.list( applicationId='207535951991', customerId='<CUSTID>', maxResults='1', actorEmail='<USERNAME>@my.fit.edu').execute() print_activities(activity_list) pages = range(2) for i in pages: # Now retrieve the next 2 events match = re.search('(?<=continuationToken=).+$', activity_list['next']) if match is not None: next_token = match.group(0) #print '\nRetrieving the next 2 activities...' activity_list = activities.list( applicationId='207535951991', customerId='<CUSTID>', maxResults='1', actorEmail='<USERNAME>@my.fit.edu', continuationToken=next_token).execute() print_activities(activity_list) -- 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/-/JZqXsOrHmR8J. 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-mgmt-apis?hl=en.
