add promise based api call