The Vault Loader Command Line tool allows you to perform all bulk create, export, update, and delete actions from the terminal. You can also view and manage files and folders on your Vault’s file staging server.

The process has three basic steps:

  1. Open a command line console.
  2. Use the command line tool to authenticate with your Vault.
  3. Use the command line tool to load data via an input file or to export data from your Vault.

Loading Basics

When you load content and data into Vault:

  • You must specify an input file in CSV format. The file extension can be CSV or TXT.
  • Input files must include all required fields and can include any additional editable fields that you wish to update.
  • Optional: Upload any document source files and renditions to the file staging server. If you don’t add source files, documents will be created as placeholders.
  • Optional: You can use a mapping file to match fields in an existing data file with an input file.

Using the Key Field in Mapping Files

When you use a mapping file to Update, Upsert, or Delete object records, you can use the KeyField column name in your CSV. When specified, Vault uses this field as the idParam for lookup. If you specify both IdParam and Keyfield, Vault uses Keyfield for lookup.

Extracting Basics

When retrieving information from Vault:

  • You must specify a filename for the output file using the -csv flag. All output files are plain text and CSV-formatted.
  • Optional: You can use a "" command with specific field values to filter the items included in your extract.
  • Optional: You can specify a location for the output file. Otherwise, the file will be created in your current directory.
  • Optional: You can specify a column layout. Otherwise, the file will include all fields and their values.

Currently, the command line tool can export object records, document metadata, document types, users, and groups.

Responses

After processing a command via the command line tool, Vault creates various response files in your current directory.

  • Success log: CSV file with fields and values for successfully loaded records.
  • Failure log: CSV file with error messages for each record that failed to load.
  • Output file: CSV file with exported data.

You can use the success, failure, and export files to edit and reload records as needed.

If you are performing an action using the -async flag, you can use the following commands to retrieve status information:

Action Description
-jobstatus Use this action to retrieve status information (job ID, progress, start time, end time, etc.) for all operations that you've run via the command line tool since generating the VL-Config file.
-jobstatus [JOB_ID] Use this action to retrieve status information (progress, start time, end time, etc.) for a specific operation.
-jobresults [JOB_ID] Use this action to create a success or failure log and a text file with the job details, including progress, start time, and end time.

Getting Started

The command line tool is distributed as a single JAR file (VaultDataLoader.jar) and does not require installation. Download the ZIP file, extract it, and run it from a command line console. You’ll need Vault Loader permissions to do this.

To get started with the command line tool:

  1. In your Vault, navigate to the Loader tab and download the command line tool from the left sidebar. When Vault releases new versions, you’ll need to download the latest file.
  2. Extract (unzip) the downloaded file.
  3. Verify that you have installed JDK V17.

We recommend creating a local directory for Vault Loader-related files. This can help you keep track of the following files:

  • Command line tool (VaultDataLoader.jar)
  • Vault DNS and authentication information (vl-config.xml)
  • CSV input files
  • CSV success and failure logs
  • CSV or TXT export files

Command Line Arguments

A command line argument is a parameter passed to Vault Loader. When using Vault Loader, arguments include both commands that define what operation to perform, like -createdocuments, and modifiers for that operation, like -all to specify that a delete operation would affect all object records or -csv filename.csv to indicate that Vault Loader should create documents based on the information in the specified CSV file.

A full list of arguments is available via the command line tool using the argument -h or -help.

Learn more about Vault Loader command line arguments in the Vault Loader Command Line Tool Reference.

To use command line arguments to view and manage files and folders on your Vault’s staging server, see the Vault Loader File Staging Command Line Tool Reference.

Authentication & VL-Config Files

Before running any other commands, use your Vault username and password to authenticate with your Vault:

java -jar VaultDataLoader.jar -username steve@veepharm.com -password p@$$w0Rd -dns https://veepharm.veevavault.com

The first time that you run this command, the command line tool creates the file vl-config.xml, which saves your DNS and username for future commands. If you work with multiple Vaults or multiple user accounts, you must delete this file and re-run the authentication command each time you switch Vaults or switch users.