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.
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.