Web service APIs that conform to REST architecture is called RESTful APIs. Microservices mostly implement the HTTP-based RESTful APIs that are stateless and have a base URI and a media type (https://en.wikipedia.org/wiki/Media_type) for the representation of resources. It also supports predefined standard operations that are mapped to HTTP methods such as GET
, POST
, PUT
, DELETE
, and more.
For example, as shown in the following table, the Order service may define an API /orders
to get access to the orders that it maintains. It can support a GET
method to look up all the orders or get a specific order by specifying the order ID. It can also allow clients to create new orders by using the POST
method or create an order with a specific ID by using the PUT
method. Similarly, it can support the PUT
method to update order details and the DELETE
method to delete an order by specifying the order ID explicitly.
URI | HTTP method | Operation | Description |
|
| Read | Gets all the... |