added API REST functions