When people say, "I want to build an API", nowadays, they almost always mean a REST API. RESTful APIs have been the dominant way of building APIs nowadays and for a good reason. Their properties make them scalable and robust for the modern world of distributed computing, and even though they are far from the only way of building APIs, they are the most popular by a wide margin. In this course, Nick will teach you how to build REST APIs based on his experience building them for millions of users in billion-dollar companies.
Welcome
What will you learn in this course?
Who is the course for and prerequisites
What is REST?
The 6 constraints of REST
Resource naming and routing
HTTP Verbs are meaningful
Using response codes to indicate status
Flexible response body options
Understanding Idempotency
Using hypermedia for connectedness
The different types of errors
Section recap
The system we will build an API for
Creating the projects
Defining the movie API contracts
Creating a temporary database
Creating the movies controller
Implementing movie creation
Introducing mapping
Keeping track of the endpoints
Implementing movie retrieval
Perfecting the movie creation endpoint
Implementing movie update
Implementing movie deletion
Why partial updates are not used
Section recap
Implementing slug-based retrieval
Moving to a real database
Adding the database infrastructure code
Removing the old in-memory database
Adding a business logic layer
Implementing validation
Cancellation token passing
Section recap
Authentication and Authorization in REST APIs
What is the JSON Web Token?
The token generation service
Implementing JWT Authorization
Limiting actions for an admin
Limiting actions for a trusted member
Section recap
The concept of movie ratings
Where should ratings live?
Preparing the database
Using the user id
Updating the existing functionality to support ratings
Rating a movie
Deleting a rating
Retrieving user ratings
Section recap
Filtering
Sorting
Pagination
HATEOAS
Basic versioning
Advanced versioning
What is Swagger?
Integrating versioning in Swagger
Integrating auth in Swagger
Extending Swagger documentation
Adding health checks
Implementing Response caching
Implementing Output caching
Implementing API-key based auth
Implementing multiple auth
Section recap
Why create an SDK?
Creating the SDK project and the client example
Introducing Refit
Retrieving movies
Using the HttpClientFactory
Adding authentication
Handling token generation and refreshing
Adding the remaining requests
Section recap
What are Minimal APIs?
Creating the new endpoint structure
Migrating movie retrieval
Migrating movie creation
Migrating movie listing
Migrating movie update
Migrating movie deletion
Migrating rating endpoints
Migrating Auth
Updating Swagger
Updating versioning
Updating output cache
Section recap
Course conclusion
Course Info
Lifetime access
Add to Cart
Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.
He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.
Nick creates free content on YouTube and is the host of the Keep Coding Podcast.
More courses by Nick Chapsas© 2023 Dometrain. All rights reserved.