Update rest-api.js