Api return a promise