An Expert Guide to Using Digital Platforms
Application Programming Interface Design for a Digital Transformation
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 clients no longer use them.
Click below to view the next chapter on authentication provided by an identity provider for an API.