added basic rest api code