Update javascript api