added rest api functions