Adds query to api functions
Merge branch 'master' of https://github.com/edu-iglesias/HAGI