first attempt to rest api with sql persistence