Wiring up ui to api