Groups
Sign in
Groups
Google Apps Domain Information and Management APIs
Conversations
About
Send feedback
Help
Admin Audit API query by startTime
25 views
Skip to first unread message
yotame
unread,
Aug 24, 2012, 5:17:06 AM
8/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-app...@googlegroups.com
I want to get audit log from 10 days ago.
activity_list = activities.list(
applicationId='207535951991',customerId='xxxxxxx').execute
This works fine.but
activity_list = activities.list(
applicationId='207535951991',customerId='xxxxxxx',startTime = datetime.datetime.today() - datetime.timedelta(days=10) ).execute()
This result Bad request
HttpError: <HttpError 400 when requesting
https://www.googleapis.com/apps/reporting/audit/v1/[customerID]/207535951991?alt=json&startTime=2012-08-14+17%3A53%3A51.990000
returned "Bad Request">
Would somebody please tell me how to set condition of startTime using Python API?
yotame
unread,
Sep 17, 2012, 5:04:28 AM
9/17/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-app...@googlegroups.com
I formated the datetime as bellow, and it works.
(datetime.datetime.today() - datetime.timedelta(days=10)).strftime("%Y-%m-%dT%H:%M:%S.%fZ")
'2012-09-07T18:01:41.287000Z'
Reply all
Reply to author
Forward
0 new messages