Connect the api to the ui