API for homework now working! Returns json data from database.