node rest api helpers