Right now PQL and the prototype here: https://github.com/puppetlabs/puppetdb/pull/1787 but it does not have pagination. Once we get pagination into the AST, this can be worked on.