使用云端硬盘API监控整个域的Google云端硬盘文件中的更改 [英] Monitoring changes in Google Drive files for whole domain using Drive API

查看:132
本文介绍了使用云端硬盘API监控整个域的Google云端硬盘文件中的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在创建Google Drive审核应用程序,以保留Gapps域中所有文件的更改列表。问题是,我们需要为每个用户一个一个地进行impersonificate,以便获得所有更改,因为似乎没有全局API方法。

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.

这是可伸缩性的可怕方法,因为我们有大量的用户(10000+)和每个用户的更改负载。

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

有什么方法可以获取文件的更改整个域名一次或至少以一些更具扩展性的方式? Google Drive API文档在这里没有帮助。感谢。

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.

推荐答案

全域代表团简化了您的应用程序的身份验证部分,但您仍需要为每个用户授权以获取其文件和更改。

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.

我相信大多数需要扫描此级别内容的应用程序都是通过cron作业或AppEngine 任务队列,这样可以轻松整天扫描整个扫描。通常他们希望每24小时扫描一次用户帐号。

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.

这篇关于使用云端硬盘API监控整个域的Google云端硬盘文件中的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆