cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

API v2 fileID support versus path

New member | Level 2
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
Highlighted

Re: API v2 fileID support versus path

Dropboxer
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.
Highlighted

Re: API v2 fileID support versus path

Dropboxer
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.
Highlighted

Re: API v2 fileID support versus path

New member | Level 2
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.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?