Here i connected my sugar instance using rest API from a java script file