Designing REST APIs

Learn how to design a REST API using HTTP verbs along with the resource, operations, and API endpoints.

Before we start building our server, we need to know the answers to a few questions:

  • What will be the resource that our server works with? What does it contain?
  • What are the operations on the resource that will be supported by our server?
  • What will happen when an operation is performed on the resource?
  • What will the API endpoints provided by the server look like?

To answer these questions, we’ll be defining the use case that we’ll follow throughout this part of the course.

Let’s begin with understanding the REST methods.

REST methods

APIs, regardless of whether they are REST or SOAP, expose ...