Getting full binder contents with the API


Can anyone suggest a way to obtain the entire contents of a binder (so as to retrieve all renditions of its components), with the order of the components?

With the API, it seems that one would need to build a recursive function to walk down the hierarchy for each section and sub-binder. I'm hoping there might be an easier way (e.g. some VQL trick).





  • Avatar
    Kevin N Official comment

    Hi Raph,

    In the v18.3 API, you can run the following API query to grab all the documents within a specific binder; this will include documents within a section; however, sub binders (nested binders) will not be retrieved. To retrieve the nested binders, you will have to recursively walk down the hierarchy.

    Documentation for this query is under Querying Vault Binders:

    SELECT document__sysr.name__v,document__sysr.binder__v, document__sysr.id, binder__sysr.id, binder__sysr.name__v, parent_node__sysr.name__v, order__sys from binder_node__sys WHERE binder__sysr.name__v = '<binder_name>' AND type__sys = 'document__sys'

    The order__sys value will give the ordinal position of the binder node that defines it's order in a numerical value: -110 is before -100 and 100 is after -110 and -100.

    Once you have the documents, you would want to run a second set of Querying Vault Renditions API calls to grab the rendition information.



    Kevin N

  • Avatar
    Raphael Goubet

    Thanks Kevin! One more reason to look forward to 18R3, although it seems there's no escaping a recursive function entirely.

  • Avatar
    Andy Han

    Hi Raph,

    You can also look at the Binder Export API .  This will produce a zip file with the binder contents and place it on your Vault Staging server where it can be retrieved over FTP.  This would eliminate the need to recurse.


  • Avatar
    Andy Han

    Sorry the link to the API documentation didn't seem to come through.  Find it here: https://developer.veevavault.com/api/18.2/#export-binder

Please sign in to leave a comment.