make RestApi functions