2

How can I get PREVIEW and PRINT events from Reports API? Here are links to documentation:

  1. PREVIEW - https://developers.google.com/admin-sdk/reports/v1/appendix/activity/drive#preview
  2. PRINT - https://developers.google.com/admin-sdk/reports/v1/appendix/activity/drive#print

Regarding PREVIEW, I've noticed that it creates just VIEW even if I open the file in preview mode via Web app: Screenshot. So it's not clear when PREVIEW should be triggered.

Regarding PRINT, I used both ways:

  • hotkey Command+P
  • File -> Print Nothing work, it doesn't create PRINT event.

I'm using googleapiclient (Python) library to get activities. Here is a code:

client = build('admin', 'reports_v1', credentials=credentials)
response = client.activities().list(
    userKey='all', 
    applicationName='drive', 
    maxResults=5, 
    eventName='print',
).execute()

This code works properly for getting other events such as DOWNLOAD, EDIT, etc. But for PRINT and PREVIEW it always returns the response without events:

{'kind': 'admin#reports#activities', 'etag': '"SOME_ETAG"'}

1 Answers1

1

This seems to be an already reported behaviour in public issue tracker. I tried to perform your actions and I can confirm that I could reproduce your behaviour.

In order to bring more attention to this report please indicate that you are also affected by clicking on the star icon at the top left of this report.

Mateo Randwolf
  • 2,823
  • 1
  • 6
  • 17