add script to run the rest api