added rest api to models