We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
eminem18753
3 years agoExplorer | Level 4
get_current_account and get_space_usage api returns inconsistent tag
get_current_account api returns tag as "user", and get_space_usage api returns "team", which is inconsistent
get_current_account
{
......
"root_info": {
".tag": "user",
"root_namespace_id": "11078782000",
"home_namespace_id": "11078782000"
}
}
get_space_usage
{
"used": 2702286001658,
"allocation": {
".tag": "team",
"used": 2525035157914,
"allocated": 91259465105408,
"user_within_team_space_allocated": 0,
"user_within_team_space_limit_type": {
".tag": "off"
},
"user_within_team_space_used_cached": 2621858815064
}
}
5 Replies
- Здравко3 years agoLegendary | Level 20
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.
- Greg-DB3 years ago
Dropbox Community Moderator
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.
- eminem187533 years agoExplorer | Level 4
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 } }
- Здравко3 years agoLegendary | Level 20
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? 😉
- Greg-DB3 years ago
Dropbox Community Moderator
eminem18753 There may be some delay in updating some of these values, so you may see some inconsistencies at certain points.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 days ago
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 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!