refresh script api