Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

Thomas G.46's avatar
Thomas G.46
New member | Level 1
10 years ago

API v2 Optional file id

What reasons could a FileMetadata be returned without a file id?

10 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Right now, just due to various technical details on the backend, we can't guarantee that every single file will have an ID, though it should be very rare for a file not to have one. We'll be working on improving this though towards the goal of making this guaranteed. 

  • Joel T.9's avatar
    Joel T.9
    New member | Level 2
    10 years ago

    Is there a plan to have file id's (when they are all populated) as part of the getDelta() API?

  • Joel, the equivalent of `/delta` in v1 is `/files/list_folder` in v2, which does already include file IDs.

  • Joel T.9's avatar
    Joel T.9
    New member | Level 2
    10 years ago

    Thanks for the quick response.

    I presume that means a Java wrapper call for that is forthcoming?

  • Yes, I think I recall seeing a bug earlier today that it's currently not exposed in the Java SDK. It's certainly supposed to be in there.

  • Specifically, I think the missing overload is the one that allows you to pass recursive=true. If you're doing a non-recursive call, listFolder in the v2 Java SDK should already give you back file IDs.

  • tomdev l.'s avatar
    tomdev l.
    Explorer | Level 3
    9 years ago

    Is there still a chance that a file/folder retrieved through the API will not have an id?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    The id field has been changed to required, so every FileMetadata/FolderMetadata object will have it now.

  • tomdev l.'s avatar
    tomdev l.
    Explorer | Level 3
    9 years ago

    That's perfect, thank's for the fast reply. I don't suppose there's any way to get the file id for a DeletedMetadata object as well?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago

    No, we'll consider it a feature request though.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!