added rest api endpoints