added query rest endpoint