Monitoring changes in Google Drive files for whole domain using Drive API

半腔热情 提交于 2019-12-03 14:14:49

问题


we are creating Google Drive moderation application to keep list of changes for all files in a Gapps domain. The problem is that we need to impersonificate as every single user - one by one - in order to get all the changes since it seems there is no global API method for this.

This is terrible approach for scalability since we have loads of users (10000+) and loads of changes for each of them.

Is there any way to get changes of files for whole domain at one shot or at least in some more scalable way? Google Drive API docs are no help here. Thanks.


回答1:


Domain-wide delegation simplifies the authentication portion for your app but you'll still need to auth as each user to get their files and changes.

It may be possible for your app to "grab" all files and make itself (or a special user) the owner, then you just have one user account to scan but the "grab" process would still need to run at regular intervals to find new files created or uploaded by end users.

I believe most apps that need to scan content at this level do it via cron jobs or AppEngine task queues which make it easy to chunk up the scans throughout the day. Generally they expect to scan each user account once every 24 hours or so.



来源:https://stackoverflow.com/questions/17021007/monitoring-changes-in-google-drive-files-for-whole-domain-using-drive-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!