Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
-14% $21.48$21.48
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$18.53$18.53
Ships from: Amazon Sold by: Books For You Today
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
REST API Design Rulebook 1st Edition
Purchase options and add-ons
In todayâ??s market, where rival web services compete for attention, a well-designed REST API is a must-have feature. This concise book presents a set of API design rules, drawn primarily from best practices that stick close to the Webâ??s REST architectural style. Along with rules for URI design and HTTP use, youâ??ll learn guidelines for media types and representational forms.
REST APIs are ubiquitous, but few of them follow a consistent design methodology. Using these simple rules, you will design web service APIs that adhere to recognized web standards. To assist you, author Mark Massé introduces the Web Resource Modeling Language (WRML), a conceptual framework he created for the design and implementation of REST APIs.
- Learn design rules for addressing resources with URIs
- Apply design principles to HTTPâ??s request methods and response status codes
- Work with guidelines for conveying metadata through HTTP headers and media types
- Get design tips to address the needs of client programs, including the special needs of browser-based JavaScript clients
- Understand why REST APIs should be designed and configured, not coded
- ISBN-101449310508
- ISBN-13978-1449310509
- Edition1st
- PublisherO'Reilly Media
- Publication dateNovember 29, 2011
- LanguageEnglish
- Dimensions7 x 0.24 x 9.19 inches
- Print length112 pages
Frequently bought together

Customers who bought this item also bought
Editorial Reviews
About the Author
Mark has fourteen years of engineering, management, and architecture experience with The Walt Disney Company. He began his career with Starwave creating rich, interactive Java applets for ESPN Sportszone, NFL.com, and NASCAR Online. Mark architected and developed the content management system (CMS) that powers all of the Disney web sites including ESPN.com, ABC.com and Disney.com. In 2008, he received a "Disney Inventor Award" for creating a "System and Method for Determining the Data Model Used to Create a Web Page."
Product details
- Publisher : O'Reilly Media; 1st edition (November 29, 2011)
- Language : English
- Paperback : 112 pages
- ISBN-10 : 1449310508
- ISBN-13 : 978-1449310509
- Item Weight : 7.2 ounces
- Dimensions : 7 x 0.24 x 9.19 inches
- Best Sellers Rank: #246,011 in Books (See Top 100 in Books)
- #42 in Web Services
- #247 in Software Development (Books)
- #815 in Internet & Social Media
- Customer Reviews:
About the author

Mark has 20 years of experience developing large-scale network systems. He began his career with Starwave creating rich, interactive Java applets for ESPN, the NFL, and NASCAR. Mark architected and developed the content management system (CMS) that powers all of the Disney web sites including ESPN.com, ABC.com and Disney.com. In 2008, he received a "Disney Inventor Award" for creating a "System and Method for Determining the Data Model Used to Create a Web Page." In 2011, Mark led the architecture of the API management system used by Walt Disney Theme Parks and Resorts. In 2019, he founded the Purple Island game studio and developed the game Poker Squadrons, which was released in 2021.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The one issue I have with the book is its use of WRML. While you can ignore the constant mention of WRML and still benefit from the book, it does get to be a little much. This wouldn't be a huge issue if WRML were a fairly well adopted standard, but it's not.
To get around this, I simply read all of rules and tried to learn the concept/essence of the rule of it used WRML. Most of them used it as a suggested implementation of the rule, so it wasn't difficult to do.
The rules in this book are well thought-out solutions to constraints which are rarely addressed. A subset of them will appeal to people trying to write a 'REST' API based on their existing definition, but they may rebel against the added complexity related to media types such as WRML. As for WRML itself, it is just one example of how to meet the constraints of REST such as HATEOAS. The principles can obviously be extrapolated into your own solution. The principles used in the WRML solution can be invaluable in transforming a traditional RPC API into a true REST API.
If you are not designing your own general media type to be used across organizations and problem domains, or unless you want to use the imaginary (as far as I can tell) WRML media type, you can probably skip chapter 5. The relevance is limited to a very niche audience. You can usually either create and document your own domain-specific media type, or use a well-known type (e.g. JSON-LD, Siren, HAL, JSON API, Collection+JSON).
Complaints about the inclusion of WRML media type details may be well founded, but the ideas behind this media type should definitely not be dismissed. As far as examples of good APIs, Twilio's API uses a media type that follows some of the principles behind WRML, and Github's uses a bunch as well.
There were some good ideas for people starting their first RESTful system, but this isn't exactly a codified type of system by its very nature. He did put some ideas together for his own standardization, but I didn't really find them to be at the point where I'd change any of my existing code.
The best design appears to be extremely simplistic, whereby you have a root, then collections, then records, then functions, where you then execute your CRUD expressions.
He recommends (as most developers would) that you use the correct CRUD expression for the correct job rather than using parameters. So, you'd have:
[...]
rather than
[...]
And use the type DELETE to say that it's a delete. This is easy if you are using something like curl to effect the action, but in the web-world, we're stuck with security issues that cause this to be impossible.
From an AJAX call, I can't execute a DELETE function. Moreover, unless I'm using something like CORS, I can't do a cross-domain post unless I'm using JSONP, which only accepts GET.
(JSONP & CORS are another book altogether!)
In any case, if you want to make things both RESTful and work in real life, you need to use ALL GET STATEMENTS.
Yes, it's horrible and awful and messy, but it works. In 5 years, we may have CORS to the point where it is functional on all browsers, but right now it isn't.
Another issue I noticed was the insistance on only using paths to execute calls, and including the requested return type in the paramenter. So, to get myrecord I'd do this:
[...]
or
[...]
Well, I happen to do this:
[...]
It is bad form to include the script, but in the real world, you can put together these generic handlers very quickly and they are quite effective. Moreover, they require absolustely no setup or configuration. I can give a 15yr old programmer a generic handler and they can have it up in seconds. All our databases are cloud systems (either Amazon R2 or Azure) so, we pop those handlers on a fat set of machines and we don't worry about losing a tiny bit of efficiency. HOWEVER, if you're going to be doing a lot of work with client-side applications, you really should be using an MCV4 app to serve it. If you are a web-app company, and have a bunch of engineers who live in a .Net web form world, stick with the handlers, that way you can leverage existing personnel.
As far as this book, I was looking for some better ideas with more detail as to the best way to set up these interfaces so they can "start" with JSONP and then be converted over the CORS at a later time. We work in constant flux and REST is moving too fast to formally codify until CORS support covers 99% of the market.
Top reviews from other countries
Useful
Very useful on the understanding and the design of your API
Rest could be use on many technologies








