Update js/api.js