Create api.js

sample interfaces for serving ui data