Binding api to front end