now add rest api to view channels and switch channel