Implementing partial response

Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. In this mechanism, the client sends the required field names as the query parameters for an API to the server, and the server trims down the default response content by removing the fields that are not required by the client. In the following example, the select query parameter is used for selecting fields that would be transferred over the wire:

/employees/1234?select=firstName,lastName,email

The Jersey framework supports the partial response feature via org.glassfish.jersey.message.filtering.SelectableEntityFilteringFeature. To enable this feature, you just need to register ...

Get RESTful Java Web Services - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.