cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App 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: 

Get full path

Get full path

L3monxx
Explorer | Level 3
Go to solution

Hello,

I get  shared folders for API 

 

{ "name": "SOLAR", "namespace_id": "1413620231",  "namespace_type": {".tag": "shared_folder" } } 

and i need full path to folder  (user@domain.com/folder/folder1/SOLAR)

Can you get this path from the API by knowing the namespace_id?

Thanks for help

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

It looks like you have the output of /2/team/namespaces/list[/continue]. This will give you the namespace ID of shared folders, etc., for the team, but the path can vary for each member of the shared folder. To get the path for any given member, you'd need to look up the shared folder using their account.

 

For instance, you can do so using /2/sharing/get_folder_metadata using the namespace_id as the shared_folder_id. If your app/access token is connected to the team itself, you'd need to use the "member file access" feature to operate on a specific team member.

 

You may also want to check out the File Access Guide and Team Files Guide for more reference.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

It looks like you have the output of /2/team/namespaces/list[/continue]. This will give you the namespace ID of shared folders, etc., for the team, but the path can vary for each member of the shared folder. To get the path for any given member, you'd need to look up the shared folder using their account.

 

For instance, you can do so using /2/sharing/get_folder_metadata using the namespace_id as the shared_folder_id. If your app/access token is connected to the team itself, you'd need to use the "member file access" feature to operate on a specific team member.

 

You may also want to check out the File Access Guide and Team Files Guide for more reference.

L3monxx
Explorer | Level 3
Go to solution

Thanks for reply

I get path but not for all ns

 

Example:

 

 

{
  "access_type": {
    ".tag": "owner"
  },
  "is_inside_team_folder": false,
  "is_team_folder": false,
  "owner_team": {
    "id": "",
    "name": "Company"
  },
  "name": "LEGAL",
  "policy": {
    "member_policy": {
      ".tag": "anyone"
    },
    "resolved_member_policy": {
      ".tag": "anyone"
    },
    "acl_update_policy": {
      ".tag": "editors"
    },
    "shared_link_policy": {
      ".tag": "anyone"
    },
    "viewer_info_policy": {
      ".tag": "enabled"
    }
  },
  "preview_url": "",
  "shared_folder_id": "ID",
  "time_invited": "2022-02-10T12:29:24Z",
  "access_inheritance": {
    ".tag": "inherit"
  }
}
{
  "access_type": {
    ".tag": "owner"
  },
  "is_inside_team_folder": false,
  "is_team_folder": false,
  "owner_team": {
    "id": "",
    "name": "Company"
  },
  "path_lower": "/poczta_kurierzy",
  "parent_folder_name": "",
  "name": "POCZTA_KURIERZY",
  "policy": {
    "member_policy": {
      ".tag": "anyone"
    },
    "resolved_member_policy": {
      ".tag": "anyone"
    },
    "acl_update_policy": {
      ".tag": "editors"
    },
    "shared_link_policy": {
      ".tag": "anyone"
    },
    "viewer_info_policy": {
      ".tag": "enabled"
    }
  },
  "preview_url": "",
  "shared_folder_id": "ID",
  "time_invited": "2021-12-17T14:37:39Z",
  "access_inheritance": {
    ".tag": "inherit"
  }
}

 

 

Greg-DB
Dropbox Staff
Go to solution

If the path is not present, that means that it is not mounted for that user, per the documentation:

path_lower String? The lower-cased full path of this shared folder. Absent for unmounted folders. This field is optional.

L3monxx
Explorer | Level 3
Go to solution

I don't really understand, the user owns the ns and doesn't have it mounted?

Greg-DB
Dropbox Staff
Go to solution

Yes, it's possible for a member (even the owner) of a shared folder to not have it mounted in their account. The Sharing Guide may also serve as a useful reference.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    L3monxx Explorer | Level 3
What do Dropbox user levels mean?