Skip to content

Vault Toolbox includes a VQL Editor that allows you to send Vault Query Language (VQL) queries to access, retrieve, and interact with Vault data. The VQL Editor includes a Query Builder interface to assist with building VQL queries. See the VQL Overview to learn more.

This guide explains how to use the VQL Editor to build, run, and save VQL queries, as well as download their results.

Build and execute queries with the VQL editorBuild and execute queries with the VQL editor

To send a VQL query, you can enter the query directly in VQL Editor or build one using the Query Builder. Click Run VQL to send the query.

Query results appear in the bottom half of the editor. You can select Table or JSON below the query results panel to change the format of the results. Click Download CSV to download query results in CSV format.

The VQL Editor retrieves results using the default PAGESIZE. You can reduce this by setting the PAGESIZE in your query. Click Next Page and Previous Page at the bottom of the editor to navigate through results. Learn more about PAGESIZE in the VQL documentation.

The VQL Editor allows you to save up to 20 queries. This is helpful for preserving long or complicated queries for future use.

To save the query currently in the editor:

  1. Click Save Query ().
  2. In the dialog, provide a name for the query and select it from the dropdown. Provide the name of an existing query to overwrite it.
  3. Optional: To make the query load automatically when you open the VQL Editor, select the Default? checkbox. Doing so unsets any previously set default query.
  4. Click Save ().

Click the icon to view a dropdown menu listing your saved queries. To insert a saved query, select its name in the list. To delete a saved query, click Delete Saved Query () and select a query. In the dialog, click the Delete to confirm or the Cancel to return to the editor.

The Query Builder in the right panel of the VQL Editor allows you to select values from dropdowns to build a query. This is especially helpful if you don't know the API names of the objects, fields, relationships, or picklist values you want to query. Toggle the icon to hide or show the Query Builder.

To build a query with the Query Builder:

  1. Select the Category of the query target.
  2. Select a query Target. This value will be added to the query's FROM clause.
  3. Select one or more Fields. These values will be added to the query's SELECT clause.
  4. Optional: Click + Add Filter to set values for the query's WHERE clause.
  5. Optional: To add additional filters, click + Add Filter again. Select an operator, either AND or OR. To remove a filter, click the red minus (-) icon.
  6. Click Build Query in Editor. Your query will appear in the editor panel.
  7. Click Run VQL to run the query.

The VQL Editor is capable of storing your query history. To see queries you’ve previously run in all environments, click Query History () in the right sidebar.

You can click the icon next to a query to expand its details, including the Time it was executed, Target, Results, Response Time, Response Size, Query String, and Execution ID.

Click Rebuild () to copy a query into the editor panel to run again.