Implement the two new methods in QueriesResource

See commit 45a5bbd in core-api