Updated Query/Bar API for server side usage also