return ApiResult object from api