JAXRS allows developers to define REST APIs, which play a fundamental role in building microservices. JAXRS 2.1 is also one of the most important specifications in Java EE 8. But before we see all that in action, let's understand how a REST resource is represented over the web. A resource typically represents an entity and allows for operations on it (think domain entities such as User, Address, City, and so on). Typically, an entity will allow for create, read, update, and delete operations. In the RESTful world, a web resource is identified by its URI, and the actions to be performed are defined by HTTP methods such as POST, GET, UPDATE, and DELETE.
Here's an example of the /users URI, which is used to represent a web resource that is invoked over the HTTP protocol. The HTTP method used in the invocation signifies the operation to perform. Here are some samples...