We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
sarshavs
8 months agoExplorer | Level 3
List folder api with admin header
Hello, im using the Api list_folder and try to get any event for any user in the team. is it possible? Im using the header dropbox-api-select-admin and i saw in the docs -
-----
Specifically, t...
Greg-DB
Dropbox Staff
sarshavs As Здравко pointed out, if you use /2/files/list_folder/get_latest_cursor, the returned cursor will only allow you to get entries from after the point in time when you made that call, up until when you make the /2/files/list_folder/continue call. If you instead want to get all entries, you would need to start from /2/files/list_folder instead.
In any case, all three of these endpoints do support 'Dropbox-API-Select-User' and 'Dropbox-API-Select-Admin', but you would need to call and supply each relevant member ID as needed. (And if you want to list all of the content across the team, check out this post.)
Also, be sure to check out the Team Files Guide for information on how to access team-owned content.
Alternatively, to list events for the team, check out the /2/team_log/get_events[/continue] functionality.
sarshavs
8 months agoExplorer | Level 3
Thanks for the Answer, Greg-DB Здравко
Im aware when im using latest cursor only evens after will be visible.
I will demonstrate what i need to achieve
I have app which dropbox accounts are connected to (can be business account and non business accounts)
My goal is to get any new event in the account without knowing which user has actually generated the event.
I want to prevent from using webhook and instead trigger every couple minutes task that will fetch new events for specific account. Im trying to achieve that with one cursor for the account and the solution will be applicable both for business / no business accounts.
Both your suggestions using business api so for non business i would need to use something different.
Thanks for the time and the answeres 🙂
- sarshavs8 months agoExplorer | Level 3
Another question - all the non business accounts has upgraded to be business accounts? so every account now will support the business api if that the case it will work for me with using the get events ep.
If not so does i need to supply in list folder ep for non business account the member id or i will get all the files for any user in the non business account?
Thanks- Здравко8 months agoLegendary | Level 20
sarshavs, If you want to check if there is some event (file/folder change), usage of endpoint /2/files/list_folder/longpoll is much more efficient compared to continuously pooling. Such a solution would work with both personal and team account. Once an event appears you can check what has changed.
Good luck.
- Greg-DB8 months agoDropbox Staff
sarshavs wrote:
Both your suggestions using business api so for non business i would need to use something different.
Note that the /2/files/list_folder[/continue] endpoints can be used by any type of account, Business or not.
sarshavs wrote:
Another question - all the non business accounts has upgraded to be business accounts? so every account now will support the business api if that the case it will work for me with using the get events ep.
No, not all Business accounts have or will be upgraded to Business accounts. Dropbox offers a variety of different types of plans and users can choose which to use.
If not so does i need to supply in list folder ep for non business account the member id or i will get all the files for any user in the non business account?
When the app is linked to a specific account (Business or not), the app does not need to specify the member ID when calling /2/files/list_folder[/continue], since there is only one account connected anyway. (When the app is connected to the team itself, it needs to specify the member ID in order to identify which account to operate on.)
sarshavs wrote:
i want to be able to store one cursor for the account which will detect any change in the account for any user.
For any particular user account, you can use the /2/files/list_folder[/continue] functionality, starting with a
path
parameter of the empty string""
, to continuously list the contents of that root using the last returned cursor. You would store multiple cursors, one per user account, to monitor multiple user accounts.I suggest reading the File Access Guide and Detecting Changes Guide, if you haven't already.
- sarshavs8 months agoExplorer | Level 3
Greg-DB Thanks alot for that elaborate answer !
So for non business accounts i have nothing to worry about because we have only one user.
But for business account there may be option to not use team space configuration and if that the case does the team/get_events endpoint will return all events in the account?- Greg-DB8 months agoDropbox Staff
sarshavs Yes, /2/team_log/get_events is supported for teams with the team space configuration.
If you're interested in event types from the "file_operations" category though, note that those are only available to some Business plans, per the documentation:
Note that the file_operations category and & analogous paper events are not available on all Dropbox Business plans. Use features/get_values to check for this feature.
The list_folder functionality can be used by any account though.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf 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 or Facebook.
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!