@GET @Path("/api/sessions/{id}") public RestSession getSession(@PathParam("id") long id) throws ResourceNotFoundException { StoredSessionWithLastAttempt session = sm.getSessionStore(getSiteId()).getSessionById(id); StoredProject proj = rm.getProjectStore(getSiteId()).getProjectById(session.getProjectId()); return RestModels.session(session, proj.getName()); }