add session query endpoint