Establishing an API

Let’s learn how to perform some operations on our responses in our SQL database.

Let’s move on to the main API at mastery_persistence.ex. For this project, our API exists to save and fetch items from an SQL database. For the most part, our API will consist of Ecto queries that collect and aggregate responses in various ways.

Saving and querying our responses

It’s time to open up /mastery_persistence/lib/mastery_persistence.ex to save and query our responses:

Get hands-on with 1200+ tech skills courses.