Add initial API for querying sessions