Home » Tag Archives: RESTful Web Services (page 4)

Tag Archives: RESTful Web Services

The State of REST

software-development-2-logo

The S in REST stands for State. Unfortunately, state is an overloaded word. In this post I’ll discuss the two different kinds of state that apply to REST APIs. Applications The first type of state is application state, as in Hypermedia As The Engine Of Application State (HATEOAS), the distinguishing feature of the REST architectural style. We must first understand ...

Read More »

Spring Rest API with Swagger – Exposing documentation

spring-interview-questions-answers

Once you create API documentation it is important to make it available to the stakeholders. In ideal case, this published documentation would be flexible enough to account for any last-minute changes and also be easy to distribute (in terms of costs as well as time needed to accomplish this). To make this possible we will make use of what was accomplished ...

Read More »

Java EE 7 / JAX-RS 2.0 – CORS on REST

java-interview-questions-answers

Java EE REST application usually works well out of the box on a development machine where all server side resources and client side UIs point to “localhost” or 127.0.0.1. But when it comes to cross domain deployment (when the REST client is no longer on the same domain as the server that host the REST APIs), some work-around is required. ...

Read More »

How To Return Error Details From REST APIs

json-logo

The HTTP protocol uses status codes to return error information. This facility, while extremely useful, is too limited for many use cases. So how do we return more detailed information? There are basically two approaches we can take:         Use a dedicated media type that contains the error details Include the error details in the used media ...

Read More »

Spring Rest API with Swagger – Creating documentation

Jersey-logo

The real key to making your REST API easy to use is good documentation. But even if your documentation is done well, you need to set your company processes right to publish it correctly and on time. Ensuring that stakeholders receive it on time is one thing, but you are also responsible for updates in both the API and documentation. ...

Read More »

Spring Rest API with Swagger – Integration and configuration

spring-interview-questions-answers

Nowadays, exposed APIs are finally getting the attention they deserve and companies are starting to recognize their strategic value. However, working with 3rd party APIs can be really tedious work, especially when these APIs are not maintained, ill designed or missing any documentation. That’s why I decided to look around for ways to provide fellow programmers and other team members ...

Read More »

How To Control Access To REST APIs

software-development-2-logo

Exposing your data or application through a REST API is a wonderful way to reach a wide audience. The downside of a wide audience, however, is that it’s not just the good guys who come looking.         Securing REST APIs Security consists of three factors: Confidentiality Integrity Availability In terms of Microsoft’s STRIDE approach, the security compromises ...

Read More »

Poking around your REST application with a scriptable endpoint

java-interview-questions-answers

I love the fact that JDK comes with a ScriptEngine. It’s so flexible when you want to evaluate and troubleshoot your application that’s already deployed in an server environment. Add this REST endpoint into a Java EE app, and it will give you instant access to internal states of the app.             package myrestapp; import ...

Read More »

Spring Boot and Spring Data REST – exposing repositories over REST

spring-interview-questions-answers

Exposing Spring Data repositories over REST is pretty easy with Spring Boot and Spring Data REST. With minimal code one can create REST representations of JPA entities that follow the HATEOAS principle. I decided to re-use Spring PetClinic’s JPA entities (business layer) as the foundation for this article.       Application foundation The PetClinic’s model is relatively simple, but ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.