Switch from using telnet API to using REST API