cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: Can't get path with `ns:` prefix to work in /2/files/list_folder

Can't get path with `ns:` prefix to work in /2/files/list_folder

ncw
Collaborator | Level 8

I'm trying to get rclone to work with dropbox business accounts.

 

I read in the documentation that I should be able to use a `ns:1234` prefix on paths to view listings.

 

Here is a curl example I constructed following the documentation which doesn't seem to work:

 

$ curl -X POST -H 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--data '{"path":"ns:12345"}' \
https://api.dropboxapi.com/2/files/list_folder
{"error_summary": "path/not_found/...", "error": {".tag": "path", "path": {".tag": "not_found"}}}

 

 

However if I use the alternate form with the `Dropbox-API-Path-Root` header it seems to work.

 

$ curl -X POST -H 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--header 'Dropbox-API-Path-Root: {".tag": "namespace_id", "namespace_id": "12345"}' \
--data '{"path":""}' \
https://api.dropboxapi.com/2/files/list_folder
{"entries": [{".tag": "folder", "name": "test-folder", "path_lower": "/test-folder", "path_display": "/test-folder", "parent_shared_folder_id":....[snip successful listing]}

I'm trying to use putting the namespace in the path as the go SDK doesn't seem to support the Dropbox-API-Path-Root` header.

 

Any help much appreciated!

 

Thanks

3 Replies 3

Greg-DB
Dropbox Staff

Is the namespace ID for a "team space"? If so, you will need to use the the Dropbox-API-Path-Root header to access it. (If not, please open an API ticket with details so we can check on this for you.)

ncw
Collaborator | Level 8

@Greg-DB wrote:

Is the namespace ID for a "team space"? If so, you will need to use the the Dropbox-API-Path-Root header to access it.


 

Yes it is a team space.

 

In the docs I can't see an indication that the `ns:` prefix doesn't work with the team space root ID.

 

So is this a documentation bug?

 

Thanks for your help

 

Nick

Greg-DB
Dropbox Staff
Thanks for pointing that out! I'll ask the team to update the documentation to clarify that.
Need more support?