Create restQuery.js