Home » REST » Page 2

Tag Archives: REST

RESTful services with HATEOAS: Hypermedia, Optional Or Not?

java-interview-questions-answers

1. Introduction In this last, conclusive part of the tutorial we are going to compile our thoughts, what we have learnt so far, and come up with the answer to a single question: could we ignore hypermedia and HATEOAS altogether, essentially relaxing (intentionally or not) one of the mandatory constraints of REST architectural style, and still pretend we are building ...

Read More »

REST: Creating resources

java-interview-questions-answers

Resource creation is a common REST API operation. In this post we will see how single resource can be created. The client request Resources are typically created by sending a POST request to the parent collection resource. This creates a new subordinate resources with a newly generated id. For example, a POST request to /projects might be used to create ...

Read More »

RESTful services with HATEOAS: REST APIs and Hypermedia on JVM

java-interview-questions-answers

1. Introduction So far we have spent a fair amount of time talking about the role of the hypermedia and HATEOAS in the RESTful web services and APIs, glancing over different specifications and usability aspects. It sounded like supporting hypermedia and HATEOAS is not that difficult, just pick you favorites and you are good to go! As you may guess, ...

Read More »

REST: Managing Many-To-Many relations

java-interview-questions-answers

Introduction Managing relations between multiple resources can be an essential part of an RESTful API. In this post we will see how many-to-many relationships can be managed with a REST API. We use a simple user / group relation as an example. Let’s assume users and groups are two separate resources (e.g. /users and /groups) and we want to provide ...

Read More »

REST / Using feeds to publish events

java-interview-questions-answers

Dealing with events When working with multiple decoupled services (e.g. in a micro service architecture) it is very likely that you need a way to publish some sort of domain event from one service to one or multiple other service(s). Many widely adopted solutions rely on a separate piece of infrastructure to solve this problem (like an event bus or ...

Read More »

Build Reactive REST APIs with Spring WebFlux – Part1

java-interview-questions-answers

In this article, we will see how to build reactive REST APIs with Spring WebFlux. Before jumping into the reactive APIs, let us see how the systems evolved, what problems we see with the traditional REST implementations, and the demands from the modern APIs. If you look at the expectations from legacy systems to modern systems described below, The expectations ...

Read More »

Java/Cloud: How to Quickly Create a Kubernetes-ready REST Microservice

It is safe to say that the Microservice + Cloud combination is all the rage these days. Microservices are being developed more than ever, in turn resulting in an increase in the number of application deployments. During the past decade, containerization and orchestration tools such as Docker and Kubernetes were developed, making the microservice pattern really easy to adopt. This ...

Read More »

It Broke vs You’re Wrong

java-interview-questions-answers

When building REST APIs for microservices, there are a few design decisions to make about responses. Some responses are clearly a product of the protocols surrounding your microservice – things like the 3xx codes for instance are all about redirects and routing. In general, you will be trying to get the right 2xx codes for success. If in doubt, it’ll ...

Read More »