Skip to main content


Views are server side queries you can access through an API. Views are stored in EHR Server and the user doesn't need to provide the whole query but just the name and optional parameters. Storing AQL queries to a view provides an extra security layer, and allows developers to change them without redeploying the application that accesses them.

You can add parameters to a query, and these parameters will be passed to the view as API endpoint parameters. You can add parameters by adding variables to the query. You create a new variable with the :variable_name notation. Read more about AQL building variables in the Variables documentation.

When you have a query you want to expose through an API you can save it as a view. Click the "Save" button and select "Save as view".


When you save the view on the EHR server, the EHR server exposes the view in the API.

You can call an endpoint of the saved view: