Implemented _query in rest.