0

Document Export API

I'm looking into the Document Export API detailed here: https://developer.veevavault.com/api/18.3/#export-documents

The documentation doesn't say much about the content and form of the input JSON file. I presume it will contain the ID's of up to 10 000 documents for a job to be accepted, but no details are provided.

Also, it seems that contrary to the loader, this method does not produce a CSV file with all the document metadata. I assume that they need to be retrieved separately using VQL (unless there is another method to export the metadata of many documents in one call). Is this correct?

Thanks!

Raph

 

2 comments

  • Avatar
    Mark Arnold Official comment

    In addition to Kevin's solution, you can export specific document versions by including major and minor version numbers:

    [
    { "id" : "5", "major_version_number__v" :"1", "minor_version_number__v" :"0"},
    { "id" : "6", "major_version_number__v" :"2", "minor_version_number__v" :"1"},
    { "id" : "7", "major_version_number__v" :"0", "minor_version_number__v" :"1"}
    ]

     

    -Mark

  • Avatar
    Kevin N

    Hi Raph,

    You are correct in your assessment. The JSON file is just a list of ID values and nothing else. For example, this extracts the files for documents 5, 6, and 7:

    [
    {"id":"5"},
    {"id":"6"},
    {"id":"7"}
    ]

    The Export Documents API then only returns the files associated with the latest version of the documents - like source file, rendition files, and optionally files for all versions. It does not include any document metadata like field values, so you would indeed have to run VQL to grab each document's fields.

     

    Thanks,

    Kevin

Please sign in to leave a comment.