scripts on rest api stuff