We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
swa22
2 years agoHelpful | Level 6
Not sure how to interpret /users/get_space_usage output for team account
Hello,
I get the following output from get_space_usage for a team account:
allocation = {
".tag" = team;
allocated = 9895604649984;
used = 7346077264133...
- 2 years ago
I need to make a self correction. Turns out the user has given me a wrong input on the problem. After a deeper investigation it has turned out that all numbers in his account are adding up correctly. I apologize for the mistake!
Здравко
2 years agoLegendary | Level 20
swa22 wrote:...
My question is regarding the lower used = 7234056173955 number. It looks entirely irrelevant. ...
Hi swa22,
That's the space the particular team member (most probably you) is using already. 😀 Doesn't it clear?
swa22 wrote:...
The allocation by team is allocated = 9895604649984
...
Correct.
swa22 wrote:...
The usage by team as a whole is used = 7346077264133
...
Exactly.
swa22 wrote:...
The usage by the user within the team is user_within_team_space_used_cached = 379540969510
...
No! It just informs you about current caching; nothing more. As already mentioned, the space, used by team member, is denoted by 'used'. 😉
swa22 wrote:...
Therefore the space used by other team members is used - user_within_team_space_used_cached = 7346077264133 - 379540969510 = 6966536294623, correct?
...
No. If you want to calculate other members caching, I don't think it's possible. 🤷 In such a case you have to enumerate all members and check current caching one by one. Of course the sum of all other caching won't exceed your calculation (rather it would be smaller; likely significantly smaller).
About the space usage of other team members, it's simple - remove your used space from entire used space (i.e. 7346077264133-7234056173955 = 112021090178). 😉 Isn't it simple?
PS: By the way, using more than 6.5TB out of 9TB (where near 6.6TB used)... (almost all space)... can get your colleges angry. 😀
- swa222 years agoHelpful | Level 6
Thanks for the quick reply!
However, now I'm even more confused.
When I enumerate and calculate the total all files and folders of that user using /list_folder (and I DO use the
Dropbox-API-Path-Root and specify the user's root namespace ID) it's only like 0.7 TB, while according to you, the user is consuming around 6.6 TB.
Where are the rest of files then?
Regarding other users:
In that case, the space usage of the other members of the team can be calculated like allocation.used - used, correct? In this case it would be 7346077264133 - 7234056173955 = 112021090178 (0.1 TB). Is this correct?
Regarding the caching: I don't seem to understand what it even means. Would you please elaborate? Where the caching occurs and what for?
Thanks!
- Здравко2 years agoLegendary | Level 20
Hi again swa22,
You didn't mention exact steps you have used to receive your result in OP. That can be source of different confusion types. Take in mind that the result is context sensitive! Context - the current user as assigned by 'Dropbox-API-Select-User' header. Different users can have different access and in this context different parts of the entire business account can be seen.
swa22 wrote:..., the user is consuming around 6.6 TB.
...
No, the user, who's context is involved in the call of OP, uses ~6.5TB. 6.6TB is the space used by all members (including current user)! Take in mind that listing can show files/folders that engage other member' space (including admin owned). Did you use the same member context when you got to the information and when listed the content? 🤔... or maybe different member' contexts have been in use. 🧐😉
swa22 wrote:...
Regarding other users:
In that case, the space usage of the other members of the team can be calculated like allocation.used - used, correct? In this case it would be 7346077264133 - 7234056173955 = 112021090178 (0.1 TB). Is this correct?
...
Yes.
swa22 wrote:...
Regarding the caching: I don't seem to understand what it even means. Would you please elaborate? Where the caching occurs and what for?
...
To be honest, I don't understand why is this information provided and what it would be useful for. Let's hope Dropbox staff can clarify it... Monday. In my opinion such an info is useful internally only (load balancing on Dropbox servers), but I may be wrong.
- swa222 years agoHelpful | Level 6
> You didn't mention exact steps you have used to receive your result in OP. That can be source of different confusion types. Take in mind that the result is context sensitive! Context - the current user as assigned by 'Dropbox-API-Select-User' header. Different users can have different access and in this context different parts of the entire business account can be seen.
> Did you use the same member context when you got to the information and when listed the content? 🤔... or maybe different member' contexts have been in use. 🧐😉
I use the standard User API authentication ("Authorization: Bearer <OAUTH2_ACCESS_TOKEN>" header), I'm not using the "Dropbox-API-Select-User" header.
I'm accessing the API through a third-party app. After the user has authorized the app to access his Dropbox content, I obtain the refresh token and request an access token, which I pass to all subsequent requests to the API endpoitns.
I do pass the Dropbox-API-Path-Root header for the list_folder endpoint, but I don't pass the Dropbox-API-Path-Root header when I request the get_space_usage endpoint. Should I?
What I expect to achieve is that the user can see a breakdown of his space usage - how much space the team has in general, how much of that space is used by this particular user, and how the latter space is distributed between his files. The problem is however, that the total of all user's files is far below the number of his used space, and it's not clear where this space goes, and I cannot understand why and what I'm doing wrong.
> No, the user, who's context is involved in the call of OP, uses ~6.5TB. 6.6TB is the space used by all members (including current user)!
Well, the user's own used space is 7234056173955 B which is 6.57934 TB, and the space used by all members is 7346077264133 B, which is 6.68122 TB, so I guess we are talking about the same thing here.
> Take in mind that listing can show files/folders that engage other member' space (including admin owned).
Yes, I realize that because the listed user content can include shared folders from other users' accounts, the total of his files can appear GREATER than his actual used space figure. However, I'm observing the opposite situation - the total of his files is much LESS than his actual used space. How do we explain that?
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!