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:

{

   “orderNumber”: “12345”,

   “status”: “Shipped”,

   “deliveryDate”: “2019-06-26T13:00:00Z”,

   … etc …

}

REST APIs use the HTTP verbs such as GET, POST, PUT, DELETE to carry out API instructions.

Versioning

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.

Nick McKenna
Since 2004, Nick McKenna, BSc, MBCS Biography has been the CEO of McKenna Consultants. McKenna Consultants is a bespoke software development based in North Yorkshire, specialising in Cloud development, mobile App development, progressive web App development, systems integration and the Internet of Things development. Nick also holds a First Class Degree in Computer Science (BSc) and wrote his first computer program at the age of nine, on a BBC Micro Model B computer. For the last 21 years, Nick has been a professional computer programmer and software architecture. Nick’s technical expertise includes; Net Core, C#, Microsoft Azure, Asp.Net, RESTful web services, eProcurement, Swift, iOS mobile development, Java, Android mobile development, C++, Internet Of Things and more. In addition, Nick is experienced in Agile coaching, training and consultancy, applying modern Agile management techniques to marketing and running McKenna Consultants, as well as the development of software for clients. Nick is a Certified Enterprise Coach (Scrum Alliance), SAFe Program Consultant (SAI), Certified LeSS Practitioner (LeSS) and Certified Scrum@Scale Practitioner. Outside the office, Nick is a professional scuba diver and he holds the rank of Black Belt 5th Dan in Karate.