cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Reply and help

get_current_account and get_space_usage api returns inconsistent tag

get_current_account and get_space_usage api returns inconsistent tag

eminem18753
Explorer | Level 4

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 5

Re: get_current_account and get_space_usage api returns inconsistent tag

Здравко
Super Collaborator | 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.

Re: get_current_account and get_space_usage api returns inconsistent tag

Greg-DB
Dropboxer

@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.

Re: get_current_account and get_space_usage api returns inconsistent tag

eminem18753
Explorer | 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
    }
} 

 

Re: get_current_account and get_space_usage api returns inconsistent tag

Здравко
Super Collaborator | 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? 😉

Re: get_current_account and get_space_usage api returns inconsistent tag

Greg-DB
Dropboxer

@eminem18753 There may be some delay in updating some of these values, so you may see some inconsistencies at certain points.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Здравко Super Collaborator | Level 20
  • User avatar
    eminem18753 Explorer | Level 4
What do Dropbox user levels mean?
Need more support?