Add API for history management