Creating RESTful APIs for Microservices
Application programming interfaces (APIs) play an essential role in software development because they support loose coupling of software components, improving factors such as the maintainability and robustness of applications. This also applies to microservices applications where APIs are key components to meet microservices principles such as being self-contained and resilient.
APIs come in different forms, but we’ll focus on REpresentational State Transfer (RESTful) APIs because they are microservices in themselves and fit well in the microservices architecture.
In this chapter, you’ll learn what RESTful APIs are and how you can build them with Django and the Django REST Framework (DRF). You’ll also learn how to implement Create, Read, Update, Delete (CRUD) operations and corresponding HTTP methods with DRF.
By the end of this chapter, you’ll know what RESTful APIs are and how you consume such APIs with...