use API to get session data