Overview:
How can information in a Vault Query Language (VQL) query from multiple versions of a document or from only the Steady State version of a document be returned using the Vault API?
Root Cause:
By default, VQL queries return information from the latest version of a document which a user who runs the query has access to.
Solution:
VQL allows the use of Document Functions in order to search for documents in a Lifecycle's special states, such as Steady State or Obsolete State. In addition to what is displayed in the Product Help documentation, use this functionality to run queries against all versions of a document, which are formatted as shown below.
Select {Fields} From ALLVERSIONS documents {desired where clause}
Thank you