Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
get_current_account api returns tag as "user", and get_space_usage api returns "team", which is inconsistent
get_current_account
Hi @eminem18753,
Your results show that the account in use is team account that doesn't has independent root and member home and account root is the same thing (in such a case 'get_current_account' returns 'user'). If there is independent root namespace the same result will be 'team'. 😉 Take in mind that this label doesn't describe the account type, but rather account configuration.
Hope this clarifies matter.
@eminem18753 Здравко is correct; 'root_info' and 'allocation' in the /2/users/get_current_account and /2/users/get_space_usage endpoints, respectively, identify different properties of the account.
The 'root_info' returned by /2/users/get_current_account indicates what kind of root configuration the account has. It doesn't identify what kind of space allotment it has. A 'user' 'root_info' indicates that the account either is not a member of a team at all, or that it is a member of a team that does not have a shared team root (i.e., it doesn't use the "team space" configuration; see the Team Files Guide for information on that).
The 'allocation' returned by /2/users/get_space_usage indicates what kind of space allotment the account has. It doesn't indicate what kind of root configuration it has. A 'team' 'allocation' indicates that account shares its space quota with a team.
Hi, but why if I upload some stuff to dropbox, only the "used" changed, but the "allocation:used" doesn't change. If it's a member of team, when it uploads, the team used should change. Moreover, If the user belongs to a team, the "allocation:used" should be greater than "used". We also wonder that why "allocation:used" doesn't update in real time when we upload multiple files, only "used" updates.
{ "used": 2702286001658, // changed "allocation": { ".tag": "team", "used": 2525035157914, // not changed "allocated": 91259465105408, "user_within_team_space_allocated": 0, "user_within_team_space_limit_type": { ".tag": "off" }, "user_within_team_space_used_cached": 2621858815064 } }
@eminem18753 wrote:Hi, but why if I upload some stuff to dropbox, only the "used" changed, but the "allocation:used" doesn't change. ...
@eminem18753, Where did you upload your stuff? 🤔 In some team folder or into some your private folder (including your home folder)?
@eminem18753 wrote:... Moreover, If the user belongs to a team, the "allocation:used" should be greater than "used". ...
Maybe yes, maybe no. If something contains another thing, the first one size is bigger than the contained data size. In your case what is the container and what does this container contain? 🧐 Are your private data a part of some shared team data space or something like? 😉
@eminem18753 There may be some delay in updating some of these values, so you may see some inconsistencies at certain points.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!