Mael 1st version for query endpoint