Application Programming Interface Design For A Digital Transformation
Digital Platform Part 6 Of 10
The previous articles in this series have covered defining goals, creating architecture as well as modelling, mapping and cleansing data. Against that background, the next key activity is to design an API (Application Programming Interface) that client mobile Apps, Progressive Web Apps and Internet Of Things Apps can utilise to create a great customer experience.
Anatomy Of A Modern Application Programme Interface
A modern API is typically a REST API that exchanges JSON over the HTTPS protocol. This approach maximises the number of client App types that can leverage to the API.
REST APIs have URL structures like this:
- HTTP GET: https://someapi.mydomain.com/v1/Orders/12345
This example would retrieve JSON data that represents customer order number 12345 like this:
… etc …
REST APIs use the HTTP verbs such as GET, POST, PUT, DELETE to carry out API instructions.
Notice in the example above that “v1” forms part of the REST API URL. This is part of a common API versioning scheme. Whenever the contract of an API changes, a new version should be created which simply increases the version number. As much as possible API providers should seek to maintain older versions of their APIs for as long as possible. This is because many Apps will use the API and not all users will update their Apps in a timely manner. Usage of API versions should be monitored and versions discarded when they are no longer used by clients.
Our next article in this series will explain how to use OAuth to provide an industry standard mechanism for authenticating to an API. For more information application programming interface design, please contact McKenna Consultants today.