--- title: "Query Syntax" slug: "query-syntax" updated: 2023-05-22T22:43:10Z published: 2023-05-22T22:43:10Z canonical: "docs.visualvault.com/query-syntax" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.visualvault.com/llms.txt > Use this file to discover all available pages before exploring further. # Query Syntax [Login to view all articles and content.](https://docs.visualvault.com/Login) # VisualVault REST API Data Query Syntax ## Search for specific API Results HTTP endpoints (where noted) support the q={query} query string parameter which may be used to filter results. #### Query Syntax Boolean Operators - and - or Comparison Operators - eq (equal) - ne (not equal) - gt (greater than) - ge (greater than or equal) - lt (less than) - le (less than or equal) - between - not - like Set Operators - in - not in String/Character values - % (wildcard) - substring(value,start index, length) (substring function) Date Values - dateadd(date part,integer,date value) (Date addition function where date part can be: year,month,day,hour,minute,second) - substring(value,start index, length) (substring function) #### Examples Query syntax requirements: Query string parameter must be URL encoded - Field names must be enclosed in square brackets - Search criteria must be enclosed in single quotes Example: Filter form data where from field [invoice no] = '12345' syntax without URL encoding: q=[invoice no] eq '12345' with URL encoding: q=%5Binvoice%20no%5D%20eq%20'12345' ## Using the query string parameter In this example we will make a request using the FormTemplates endpoint. Normally with this request without the query string parameter, the results will be a complete list of all Form Templates [(see here)](https://developer.visualvault.com/api/v1/RestApi/Vault/formtemplates#getFormTemplates). We will append the query string parameter to the end of the request URL and search for a template where 'name = Purchase Requisition - Template'. We will make sure the query string is url encoded as follows. Use %20 for spaces and %27 for single quotes. ```none curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AccessToken" \ https://demo.visualvault.com/api/v1/{customerAlias}/{databaseAlias}/formtemplates/?q=name%20eq%20%27Purchase%20Requisition%20-%20Template%27 The following is returned { "meta": { "status": 200, "statusMsg": "OK", "method": "GET", "href": "https://demo.visualvault.com/api/v1/{customerAlias}/{databaseAlias}/formtemplates/?q=name eq 'Purchase Requisition - Template'" }, "data": [ { "href": "~/formtemplates/dc7e2924-7518-e211-92ad-000c29753f96", "dataType": "FormTemplate", "id": "dc7e2924-7518-e211-92ad-000c29753f96", "name": "Purchase Requisition - Template", "modifyDate": "2014-11-04T12:22:16.377", "modifyById": "{userId}", "modifyBy": "{userName}", "createDate": "2012-10-17T09:10:18.277", "createById": "{userId}", "createBy": "{userName}", "description": "Purchase Requisition", "revisionId": "80183524-7518-e211-92ad-000c29753f96", "revision": 1, "templateRevision": "1", "status": 1 } ] } ```