cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

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
Helpful | Level 5

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

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

Greg-DB
Dropboxer

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

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

ncw
Helpful | Level 5

@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

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

Greg-DB
Dropboxer
Thanks for pointing that out! I'll ask the team to update the documentation to clarify that.
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    ncw Helpful | Level 5
What do Dropbox user levels mean?
Need more support?