How can I get PREVIEW and PRINT events from Reports API?
Here are links to documentation:
PREVIEW- https://developers.google.com/admin-sdk/reports/v1/appendix/activity/drive#previewPRINT- 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
PRINTevent.
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"'}