Overview:
When running a Vault Query Language (VQL) query, an error occurs: Unknown property '{field name}' in 'field list'.
Root Cause:
Not all fields which are exposed in the API are available to be included in a VQL query.
Solution:
All Object fields that are exposed through API Calls are not accessible through a VQL query.
Consider the following VQL query:
/api/{VERSION}/query?q=Select alias__v from users where id ='{USER ID}'
The query attempts to return the value of the alias__v field in an object for a specific user, designated by the USER ID field. When the query is run, it produces an error:
Unknown property '{alias__v}' in 'field list'
If the following API Call is used on that same object, it returns the data without error:
/api/{VERSION}/objects/users/{USER ID}
The alias__v field has a queryable value set to False. This means the value is not retrievable through the VQL query.
To determine if a field value can be returned by a VQL query, it is recommended to first use a metadata Call against the object. That Call returns a number of fields of data. One of those fields, queryable, determines whether or not the field value of the object can be returned as shown in the following table:
Queryable field value |
Result |
true | The value can be returned in a VQL query |
false | The value cannot be returned in a VQL query |
Related Documentation:
Vault API Documentation: Vault User Metadata