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: 

Why file Ids are prefixed with "id:" string?

Why file Ids are prefixed with "id:" string?

DiwakarK
Explorer | Level 4

I have seen that file ids in Dropbox is prefixed with some strings like "id:" or "ns:" or "dbid:". I am new to DB and just want to know the purpose of this? And best practices to handle these ids.

1 Reply 1

Greg-DB
Dropbox Staff

These prefixes are used to identify and validate these strings across the API. E.g., the "id:" prefix is always used for a file ID, a "ns:" prefix is always used for a namespace ID, etc.

You app can store and re-use these values, but shouldn't attempt to modify them. You can see what kinds of values different parameters accept in the API documentation. E.g., you can see that the "path" parameter for the /2/files/download endpoint accepts relative paths that match '/(.|[\r\n])*', file IDs that match 'id:.*', revision values that match 'rev:[0-9a-f]{9,}', or namespace-relative paths that match 'ns:[0-9]+(/.*)?)'.
 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?