Update api.js

added "/api" to each api method.