Over a million developers have joined DZone.

RESTful Tooling and API Management

DZone's Guide to

RESTful Tooling and API Management

· Integration Zone ·
Free Resource

Want to learn more about API monitoring? Learn how Trustpilot monitors over 600 microservices with Runscope on this webinar.

In section 6.3 of Roy’s dissertation, he explains how REST applies to HTTP.  But the implementing a RESTful approach requires painstaking assembly without REST tooling.  Java JAX-RS and API Management infrastructure reduce the learning curve, increase API adoption and decrease development effort by simplifying API creation, publication, and consumption.

The Java API for RESTful Web Services: JAX-RS

JSR 311, JAX-RS, is Java’s RESTful programming model.  In JAX-RS, a single class corresponds to a resource.  Java annotations are used to specify URI mappings, mime type information, and representation meta-data conforming with REST constraints (see Table 1).

Table 1. Mapping REST concepts to JAX-RS

REST concept JAX-RS Annotation or class Examples
Addressability @Path and URI Path Template @Path(“/user/{username}”)
Uniform Interface @GET, @PUT, @POST, @DELETE, @HEAD @GET@Produces(“application/json”)public String getUser(String username) { return getUserService(username)); }
Self-descriptive messages @Produces, @Consumes @Produces({“application/xml”, application/json”})
HATEOAS UriBuilder UriBuilder.fromUri(“http://localhost/”).  path(“{a}”). queryParam(“name”, “{value}”). build(“segment”, “value”);

WSO2 Application Server relies on Apache CXF to process JAX-RS annotations and expose a RESTful API.  Your existing Apache CXF code can be readily migrated to WSO2 Application Server.

API Management

RESTful APIs may be either naked or managed.  A naked API is not wrapped in security, subscription, usage tracking, and service level management.  A managed API increases reliability, availability, security, and operational visibility.  By placing an API gateway in front of your naked RESTful API or service, you can easily gain advanced capabilities (see Figure 1).

api capabilities Figure 1: API Management Capabilities and Topology

The API gateway systematizes the API façade pattern, and enforces authorization, quality of service compliance, and usage monitoring without requiring any back-end API modifications.  Figure 2 demonstrates API facade actions commonly provided by industry leading API gateway products.

api-pipeline Figure 2: API Façade Operations

WSO2 API Manager can easily integrate with your RESTful system and rapidly add advanced capabilities.  For more information on API management, read the technical evaluation guide

Are your customers the first to know when your API is failing? Watch this webinar to learn how Trustpilot monitors over 600 microservices with Runscope, and are always on top of any API errors.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}