The REST API is a common design pattern when it comes to architecting APIs for web and mobile applications. REST stands for representational state transfer and is a design pattern that includes elements such as hypermedia, resource naming, HTTP methods usage, caching, versioning, and so on.
In this post, we are going to list some of the resources that you will find useful to learn or get in-depth about designing APIs with REST.
RESTful Web Services by Leonard Richardson
If you are getting started with building applications that consume APIs, RESTful Web Services by Leonard Richardson is a book that will help you to understand the basics of REST web services. This book covers how REST works and many other fundamentals related to web services with some real-world examples. It is not bound to one programming language syntax, so this book will help you understand RESTful APIs irrespective of the programming language you use.
REST API Tutorial (restapitutorial.com)
If you don't want to spend much time reading a book or learning REST APIs from scratch, this mini-tutorial website covers the essentials for you. Starting with a video introduction to what REST is, the website contains references to HTTP status codes and methods and information on resource naming anti-patterns.
CORS in Action by Monsur Hossain
This book from Monsur Hossain covers Cross-Origin Resource Sharing (CORS) from both client and server perspectives. It explores how to deal with key elements when it comes to creating APIs, such as performance, debugging, and security. Techniques described in this book adhere to standard best practices.
REST API Design Rulebook by Mark Masse
In this concise book for designing REST APIs, the author Mark Masse shares his best practices that have helped him design optimal APIs. He covers rules for designing URIs, guidelines for conveying metadata through HTTP headers and media types, and how to apply design principles to HTTP’s request methods and response status codes.
Error Handling with RESTful API Design - Cloud Elements Blog
Error handling is one of the most important topics when you are designing APIs using REST. Optimally handling errors is an effective way of communication between the client and the server side. This blog post from Cloud Elements shares a few intuitive techniques that they have found useful for handling errors in REST APIs.
REST Cookbook (restcookbook.com)
The REST Cookbook is another collection of amazing blog posts that primarily revolve around RESTful API design patterns. This website is created by Joshua Thijssen and covers topics like:
- What is HATEOAS (Hypertext As The Engine Of Application State) and why is it important for my REST API?
- What are idempotent and/or safe methods?
- When should we use the PATCH HTTP method?
- When should we use PUT and when should we use POST?
- When should we return 4xx or 5xx status codes to the client?
An Introduction to Securing Your New API - Nordic APIs Blog
Securing an API is an essential part of the process of creating REST APIs. This blog post provides an introductory level of guidelines and points you in the right direction for keeping your APIs secured.
Insomnia is a cross-platform REST and GraphQL client that works on operating systems like Mac, Windows, and Linux. It allows users to create HTTP requests by specifying their URL, payload, headers, and authorization in a single place.
PyRestTest is a Python-based REST API testing platform. It supports tests in JSON or YAML config files. It has few dependencies, making it easy to deploy on-server for smoke tests and health checks. Using it with your Django backend projects, you can enable the generation and validation of mechanisms for creating test scenarios.
Rest-Assured is a convenient, open-source REST testing platform for Java developers. This tool simplifies the process of testing and validating response processes. This tool also eliminates the need to make boilerplate code for testing complicated responses and supports BDD syntax.
Postman is a multifunctional instrument that can build as well as test APIs. It first began as a browser extension for Chrome and now has downloadable versions for operating systems like Mac OS, Linux, and Windows. It provides tools for designing and mocking, documenting, debugging, performing automated testing, monitoring, and publishing APIs. It also supports several API design platforms such as Swagger, Open API, and RAML.
An API Sandbox is a dedicated environment provided as a service that simulates the behavior of the production API. The benefit these sandboxes provide for developers is to test and integrate new services or features before releasing in production. Some examples of API Sandboxes are:
API Developer Weekly Newsletter
A weekly newsletter that is hyper-focused on API strategy, design, development, and architecture for web and mobile apps. Great for developers, architects, product managers, and executives.
Lastly, what we could not cover in this blog post, this GitHub repo covers for you. It includes the recommended link for JWTs, caching, security, formats, testing, and so on.