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: 

API v2 fileID support versus path

API v2 fileID support versus path

CrinaBucur
New member | Level 2

Hi,

 

I've recently rewritten our Dropbox consumer to implement the v2 API, instead of v1, following the migration guide's indications.

 

I was content to see that Dropbox now has a notion of file IDs (as opposed to paths only), as I found it troublesome in the past to work with file paths in file-sharing scenarios. Our app contains multiple cloud storage integrations beside Dropbox and we do not rely on the implicit shareable links that each cloud storage provides, but construct our own hyperlinks instead based on file IDs. In scenarios where the path to the same file was not the same in two users' Dropbox, things became more difficult (i.e. a need to search for the filename, which could be located at root level or in any of the internal folder in the hierarchy). I wanted to use IDs instead of paths, but I noticed that only certain API endpoints support IDs or REVs, while others, such as "/2/files/upload" only accept a path. Therefore it is impossible to overwrite a file for which the ID alone was stored. I would like to understand whether this is by design, as I find it to be inconsistent and kinda beats the purpose of relying on file IDs, which seemed like a great change brought by v2.

 

Thanks,

Crina

3 Replies 3

Re: API v2 fileID support versus path

Greg-DB
Dropboxer
Hi Crina, this is expected. Dropbox API introduced the notion of a file ID, but it isn't available everywhere on the API unfortunately.

We hope to implement support for file IDs on more endpoints in the future, I don't have a specific timeline to offer.

Re: API v2 fileID support versus path

Greg-DB
Dropboxer
The Dropbox API now supports file IDs for more endpoints, such as /2/files/upload:

https://www.dropbox.com/developers/documentation/http/documentation#files-upload

If you're using an official SDK, there will also be corresponding methods.

Re: API v2 fileID support versus path

CrinaBucur
New member | Level 2

Hi Greg,

 

I am not using any SDK, just low-level REST calls. This is good to know, but my organization probably won't invest in additional hours to adapt the implementation. Unfortunately we had to go with what was available in June - the file paths specification.

 

Thank you for the update, nonetheless.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    CrinaBucur New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?