Update History API sample to new API