Adding rest api