Making a database and the API