added rest api and updated db migrations