implementation of query execution via API, however it does not yet include parameter validation