The /query API seems quite useful and powerful, but it only works as well as the query statements passed to it, so need better documentation.