adapter/rest: use promises