Summary
In this chapter, we built our first REST API to manage our new content-type – classroom
. We defined the content-type for a classroom, defining the fields that make up that type, and Strapi built an API for us where we can create new classroom entities, retrieve the list of classrooms, update existing classrooms, and delete classrooms (in other words, perform CRUD operations). We saw how Strapi allowed us to create these endpoints without any coding, saving us potentially hours of development time. We also touched on the permissions model of Strapi, which allows us to interact with these endpoints.
We also dug a bit deeper into what Strapi and the Strapi CLI create for us when we create a new project or add a new content-type. While Strapi makes it extremely easy to create APIs without worrying about specific details, knowing a little bit about what goes on under the hood helps us appreciate our design options and get a feel for how it is architected. Understanding...