Hands-On RESTful API Design Patterns and Best Practices
by Harihara Subramanian J, Anupama Murali, Pethuru Raj
Bulk operation
We have seen many REST API patterns and their implementations. However, we have yet to discuss an essential pattern, called bulk operations, within the REST API. It's inevitable that our design should thrive, which will reduce performance bottlenecks, such as response time, and the number of round trips between the server and clients.
Marking a list of emails as read in our email client could be an example of a bulk operation; the customer chooses more than one email to tag as Read, and one REST API call does the job instead of multiple calls to an underlying API.
Let's take our investor service API: if a client wants to create a set of stocks for their portfolio rather than one by one, the client needs to call our REST endpoint ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access