api for getting/setting the interval