Extending a web app with a REST API
Just like the regular Julia libraries, REST APIs are meant to be used by developers in order to build applications that are interoperable. Let’s first lay some groundwork.
Preparing for a REST API
Each application changes, and it is common to introduce changes in our data model or API, such as different endpoints, different HTTP methods, different request parameters, different responses and response structures, and so on. These changes could cause other apps that access our data via the REST API to crash. That’s why we need versioning.
API versioning
By introducing versioning in our API, we allow consumer apps to continue working while providing their developers the time to update to the latest version.
There are a few ways to version REST APIs, and we’ll use what’s arguably the most popular approach: versioning through the URI path. This means that we’ll place the major version of our API into the...