In the last post in this series about Pragmatic REST API design, I talked about designing error conditions in your APIs. This time - versioning - one of the most important considerations when designing your pragmatic API.
In the previous posts in this series about Pragmatic REST API design, I talked about simplyfing associations, using the HTTP ? to hide complexities and optional parameters, choosing plural nouns and concrete names, and more. What about errors in the context of RESTful API best practices? Many software developers, including myself, don't always like to think about exceptions and error handling but it is a very important piece of the puzzle for any software developer, and especially for API designers.
In the previous post in this series about Pragmatic REST API design, I talked about choosing plural versus singular nouns and concrete names over abstract. See RESTful API Design: plural nouns and concrete names. This time we'll explore API design considerations when handling associations between resources and parameters like states and attributes.
In the first post in this series, Are you a Pragmatist or a RESTafarian?, I proposed that "pragmatic REST" is a design issue.
In the second post, RESTful API Design: nouns are good, verbs are bad, I outlined some of the API design practices that work well: Nouns in URLs are good. Verbs are bad. Try to limit your API to 2 base URLs per resource.
This time, we'll explore how to pick the nouns for your URLs.
Plural nouns are better than singular
Should you choose singular or plural nouns? You'll see popular APIs use both....
In the first post in this series about pragmatic REST API design, I defined 'pragmatic REST' as looking at API design from the developer point of view. Now let's get into specific design practices we've seen work well.
The #1 principle in pragmatic RESTful design is: keep simple things simple.
Keep your base URL simple and intuitive
The base URL is the most important design affordance of your API. A simple and intuitive base URL design will make using your API easy.
A design affordance is a design...
I wanted to write some posts on RESTful API design best practices we've observed over the last year. I covered a lot of these recently in a API design presentation but want to write more detail out.
First - let's start with our overall point of view on API design.
We advocate pragmatic, not dogmatic REST. What do I mean by dogmatic?
You might have seen discussion threads on true REST - some of them can get pretty strict and wonky.
Our view: approach API design from the...
Here are the slides and video for last week's RESTful API Design webinar, thanks again to everyone for joining. We'd love more thoughts or questions - there is a thread on the api-craft forum. We've We've created an eBook with the material from the 2nd edition RESTful API Design webcast.