Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Brian B.62's avatar
Brian B.62
New member | Level 1
9 years ago

Need to fetch all events of all users under the same admin using single access token

Hi,

We want to fetch all the events of all users under the same admin user using admin user's access token. We created "Business API App" with "Team Member File Access" permission. We have couple of questions here.
- Tried with "log-get-events" where it doesn't capture all events(uploading file etc.). webhook/inline polling? Which method do you recommend us to use and is the same available in the sdk?
- We are using sdk v2. But as sdk v2 is in beta, please let us know if this is the same recommended in the production.
- We are using DbxTeamClientV2 to query with asMember("member-id"). Is this the correct way to use it?

We need almost all events such as like, comment, share, file upload, download, folder creation, deletion, edit.. etc. and also need a delta edits/deletes during the next poll. Looking for something like various events together something like log-get-events outputs. Please let us know the recommended way to do this. A quick response will be of great help.

Thank you,
-Arjun Kadayaprath

4 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    Using a Dropbox Business API app with the "Team Member File Access" permission sounds like the right way to do this. 

    To get non-file events, you can use the /1/team/log/get_events endpoint, as you mentioned.

    To get file events, you will need to use the user-specific methods. In the Java SDK, using the asMember method to operate on a specific member is the right way.

    There isn't a single way to get that for all members of a team though, so you'll need to iterate through and perform on each member individually. We'll consider this a feature request though.

    For server-side apps, using webhooks is the best way to get notified of file changes quickly. For client-side apps, you can using longpolling.

    As you mentioned though, the API v2 Java SDK is still considered beta, so we don't recommend using it in production quite yet.

     

  • Brian B.62's avatar
    Brian B.62
    New member | Level 1
    9 years ago

    Hi Gregory,

    Greetings.

    We do have couple of more questions on this. As said, we are planning to use file events handling separately. And for all the other events, we'll use "log-get-events". Correct me if I'm wrong.

    Here the question is about the files. Which end point should we use?

    We tried using "/1/delta", "/2/files/list_folder" with recursion on and "/2/files/list_folder/continue" with cursor. All these are returning just the list of files in the provided path. We are not able to find the revisions of the files returned. Or for that we have to make "/2/files/list_revisions" call to get the revisions on each file? Is there an endpoint which returns all the file events inside the provided path for a particular user in order?

    Thanks,
    -Arjun

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    The /delta endpoint on API v1 and the /list_folder endpoints on API v2 allow your app to get the full current state of the Dropbox account, and then efficiently stay up to date with further changes. They do not offer information about previous revisions.

    If you do need full revision information, you will need to use the /list_revisions endpoint as you mentioned. There isn't a more general endpoint for getting all file events, but I'll be sure to pass this along as feedback. 

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!