API Marketplace Engineering Design
API Marketplace Engineering Design
Engineering
Design, Build, and Run a Platform for
External Developers
—
Rennay Dorasamy
API Marketplace
Engineering
Design, Build, and Run a Platform
for External Developers
Rennay Dorasamy
API Marketplace Engineering: Design, Build, and Run a Platform for
External Developers
Rennay Dorasamy
Johannesburg, Gauteng, South Africa
Introduction������������������������������������������������������������������������������������������������������������xix
Chapter 2: Regulation��������������������������������������������������������������������������������������������� 17
Background��������������������������������������������������������������������������������������������������������������������������������� 17
Screen Scraping�������������������������������������������������������������������������������������������������������������������� 18
Application Programming Interfaces (APIs)��������������������������������������������������������������������������� 19
v
Table of Contents
Open Banking������������������������������������������������������������������������������������������������������������������������������ 20
Objectives������������������������������������������������������������������������������������������������������������������������������ 20
Terminology��������������������������������������������������������������������������������������������������������������������������� 21
Benefits��������������������������������������������������������������������������������������������������������������������������������� 22
Risks�������������������������������������������������������������������������������������������������������������������������������������� 23
Prescriptive, Facilitated, or Market-Driven Approaches�������������������������������������������������������� 25
Open Banking Across the Globe�������������������������������������������������������������������������������������������� 26
From Open Banking to Open Finance����������������������������������������������������������������������������������������� 31
Sample Applications������������������������������������������������������������������������������������������������������������������� 32
Summary������������������������������������������������������������������������������������������������������������������������������������ 34
Chapter 3: Consumption����������������������������������������������������������������������������������������� 37
Marketplace APIs vs. Internal APIs���������������������������������������������������������������������������������������������� 37
Personas������������������������������������������������������������������������������������������������������������������������������������� 38
Business Value���������������������������������������������������������������������������������������������������������������������������� 39
Attract������������������������������������������������������������������������������������������������������������������������������������ 42
Educate���������������������������������������������������������������������������������������������������������������������������������� 43
Build Trust������������������������������������������������������������������������������������������������������������������������������ 44
Transparency������������������������������������������������������������������������������������������������������������������������� 45
Collaborate���������������������������������������������������������������������������������������������������������������������������� 46
Lead��������������������������������������������������������������������������������������������������������������������������������������� 47
Technical Developer Portal���������������������������������������������������������������������������������������������������������� 47
Attract������������������������������������������������������������������������������������������������������������������������������������ 49
Educate���������������������������������������������������������������������������������������������������������������������������������� 50
Build Trust������������������������������������������������������������������������������������������������������������������������������ 51
Transparency������������������������������������������������������������������������������������������������������������������������� 52
Collaborate���������������������������������������������������������������������������������������������������������������������������� 53
Lead��������������������������������������������������������������������������������������������������������������������������������������� 54
Developer Advocacy�������������������������������������������������������������������������������������������������������������������� 54
Developer Support���������������������������������������������������������������������������������������������������������������������� 55
Ecosystem����������������������������������������������������������������������������������������������������������������������������������� 57
vi
Table of Contents
Developer Engagement��������������������������������������������������������������������������������������������������������������� 58
Tooling����������������������������������������������������������������������������������������������������������������������������������������� 59
cURL�������������������������������������������������������������������������������������������������������������������������������������� 60
Postman API Client���������������������������������������������������������������������������������������������������������������� 60
Fiddler����������������������������������������������������������������������������������������������������������������������������������� 62
Developer Education�������������������������������������������������������������������������������������������������������������� 62
Summary������������������������������������������������������������������������������������������������������������������������������������ 63
Chapter 4: Monetization����������������������������������������������������������������������������������������� 65
The API Marketplace Flywheel���������������������������������������������������������������������������������������������������� 66
Your Marketplace Identity����������������������������������������������������������������������������������������������������������� 68
Value and Revenue Strategies���������������������������������������������������������������������������������������������������� 70
Developer Pays���������������������������������������������������������������������������������������������������������������������� 71
Developer Gets Paid�������������������������������������������������������������������������������������������������������������� 74
Free��������������������������������������������������������������������������������������������������������������������������������������� 75
Indirect���������������������������������������������������������������������������������������������������������������������������������� 76
Billing Engineering���������������������������������������������������������������������������������������������������������������������� 76
Analytics and Insight������������������������������������������������������������������������������������������������������������������� 80
Data Collection���������������������������������������������������������������������������������������������������������������������� 81
Data Analysis������������������������������������������������������������������������������������������������������������������������� 82
Reporting������������������������������������������������������������������������������������������������������������������������������� 85
The Notional Income Statement�������������������������������������������������������������������������������������������������� 86
Pivot to New Business Models���������������������������������������������������������������������������������������������������� 88
Summary������������������������������������������������������������������������������������������������������������������������������������ 89
Integration Strategy�������������������������������������������������������������������������������������������������������������������� 99
Google Remote Procedure Call (gRPC)�������������������������������������������������������������������������������� 103
The Power of Port-Forward������������������������������������������������������������������������������������������������� 104
Taxonomy���������������������������������������������������������������������������������������������������������������������������� 106
Platform As a Service���������������������������������������������������������������������������������������������������������������� 109
Platform Services���������������������������������������������������������������������������������������������������������������������� 110
Deployment Architecture����������������������������������������������������������������������������������������������������������� 112
Launch Configuration���������������������������������������������������������������������������������������������������������� 112
As-Is Configuration�������������������������������������������������������������������������������������������������������������� 114
To-Be Configuration������������������������������������������������������������������������������������������������������������� 115
Summary���������������������������������������������������������������������������������������������������������������������������������� 117
viii
Table of Contents
OWASP�������������������������������������������������������������������������������������������������������������������������������������� 141
Security Top 10�������������������������������������������������������������������������������������������������������������������� 141
Recommendations��������������������������������������������������������������������������������������������������������������� 143
Security Review������������������������������������������������������������������������������������������������������������������������ 144
Summary���������������������������������������������������������������������������������������������������������������������������������� 145
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
Support������������������������������������������������������������������������������������������������������������������������������������� 243
Roles������������������������������������������������������������������������������������������������������������������������������������ 243
Transition����������������������������������������������������������������������������������������������������������������������������� 245
Communication Strategy����������������������������������������������������������������������������������������������������� 246
Process������������������������������������������������������������������������������������������������������������������������������������� 247
Issue Tracking and Reporting���������������������������������������������������������������������������������������������� 248
Service-Level Agreements�������������������������������������������������������������������������������������������������� 251
Supporting Systems������������������������������������������������������������������������������������������������������������������ 251
Platform As a Service Strategy�������������������������������������������������������������������������������������������� 251
Backend Dependencies������������������������������������������������������������������������������������������������������� 252
Summary���������������������������������������������������������������������������������������������������������������������������������� 254
Index��������������������������������������������������������������������������������������������������������������������� 261
xii
About the Author
Rennay Dorasamy has spent the last 20 years in various
technology roles, ranging from architecture to development
to operations, across a number of industries. He has worked
in telecoms, with the government, and most recently in
financial services. He has considerable hands-on integration
experience working on middleware platforms from C-based
messaging to Java Enterprise Edition. He is experienced
in both core enterprise and digital contexts. As a full-stack
engineer, he is intimately familiar with technologies such
as containerization, cloud, and serverless technology for
building and deploying mission-critical solutions. He is
currently the Engineering Lead of an API Marketplace
implementation, the first of its kind in financial services on
the African continent.
xiii
About the Technical Reviewer
Robert Stackowiak is an independent consultant, adjunct instructor at Loyola
University of Chicago, and author. He formerly was a Data and Artificial Intelligence
Architect at the Microsoft Technology Center in Chicago and, prior to that, worked
at Oracle for 20 years and led teams supporting North America focused on data
warehousing and Big Data. Bob has also spoken at numerous industry conferences
internationally. His books include Design Thinking in Software and AI Projects (Apress),
Azure Internet of Things Revealed (Apress), Remaining Relevant in Your Tech Career:
When Change Is the Only Constant (Apress), Architecting the Industrial Internet (Packt
Publishing), Big Data and the Internet of Things: Enterprise Architecture for a New Age
(Apress), Oracle Big Data Handbook (Oracle Press), Oracle Essentials (O’Reilly Media),
and Professional Oracle Programming (Wiley Publishing). You can follow him on Twitter
at @rstackow and/or read his articles and posts on LinkedIn.
xv
Acknowledgments
First and foremost, this would not have been possible without God – from inception to
completion. I would like to thank my wife and the nucleus of my power core, Dineshree,
for her love and support during this project. Most importantly, for her unwavering
understanding and patience when I set out on these crazy conquests. It means more
to me than she will ever know. To my children – Kerisha and Nicalen – I am sincerely
sorry if this book took away time that I should have been spending with you. I hope that
the result makes you proud. The sagely advice, motivation, and counsel from my good
friend, Asif Hamza, encouraged me to continually set the bar higher.
The African proverb that it takes a village to raise a child rings true, and I have
been able to take on a project of this magnitude with a lifetime of encouragement,
support, and belief from my family – Mannie, Ronnie, Kamala, Savanthala, Viverge,
Tanya, Ethan, Neshica, Kerushen, Nishen, Kershnee, Alena, Ayla, Lawrence, Daisy, and
Shivaal – and friends – Ajay, Nafisa, Zara, Rayyan, Bilal, Brett, Jairaj, Jason, JJ, Kiren,
Mark, Paul “PCB,” Rajesh, Sree, Srinath, Tony, Trevlyn, Vish, Walter, Warren, Waseem,
and William (Mr. Magic).
To my fearless crewmates from the Starship Enterprise – Jacque Coetzee (Captain
Kirk), Amjid “AJ” Ali (Mr. Spock), Kevin Kalil (Dr. McCoy), and Gareth Hiepner (Uhura) –
it has been both an honor and a privilege to serve as the Head of Engineering (Scotty).
I consider myself lucky as it is not often you get to work with like-minded people and
people you really like. Special mention to our previous Product Owner, Shiv Rajah, who
played a key role in our evolution.
Building the platform also afforded me the opportunity of working with a
multinational team with a wealth of knowledge and experience, some of whom I have
never met in person – all whom I consider lifelong friends: Philip Anderson, Shafaat
Ali Yasir, my intercontinental brothers Ravi Shah (Mr. Open Banking) and Amit Pareek
(API Connect Master), the indomitable Lakshmi Basireddy (Guardian of Quality),
Miguel de Barros, Kaushik Lala, Dr. Ferdinand Damon, Donald Sepeng, Brightly
Mphahlele, Mthobisi Kunene, Monika Vadlapudi, David Napo, Anvitha Swarangi,
xvii
Acknowledgments
Sathya Perumalsamy, Deepika Chalpe, Deepika Jain, Ummair Asghar, Charles Swart,
Dingane Hlaluka, Hina Kanwal, Olivier Mulmann, Shahanoor Ahmed, Priya Singh,
Sahiti Nedunuri, Chenchaiah Sudulagunta, Louw Fouche, Ndoda Keswa, and Elizabeth
Congdon.
I am also extremely proud to be working in an organization with seasoned veterans
across several enterprise capabilities, who have been pivotal to the implementation of
our Marketplace. API Gateway: Tiaan Mouton, Andries Marx, Nkomo Magolo, Lance
Moore. Identity: Ashley Govender, Danie Weideman, Willie Visagie, Bhavna Yerpude,
Heidi Van Zyl, SW Engelbrecht. Quality Assurance: Oagile Nthutang, Kamil Maharaj,
Manesh Hari, Azeez Salawu, Criscelda Mogane. DevOps: Jaco Greyling, Steve Breyer-
Menke, Marcus Talken, Darren George, Wayne Turner, Adam Aucamp. Architecture:
Nico Basson, Paul Sing, Adele Jones, Bruce Barker, Ryan Mulholland, Gerard de Jong,
Gys Le Roux, Louis Werth, Lourens Labuschange. Project Management: Gerhard Rabie,
Annalinde Singh, Neziwe Manaka, Cyrilise Palmer, Jo Thindwa. Product: Shirley Malope,
Serisha Iyer, Charles Phillips, Warren Tromp. Infrastructure: Jan Jacobs, Tumelo Malete,
George Phage, Maanda Ambani. External: Pieter Myburgh, Lovemore Nalube, Dylan
Youens, George Nel, Hardus van der Berg, Akash Shaha, Loyiso Matymza, Damon Vrkoc,
Kabelo Mokwana, Henry Oertel. Forensics: Justin Fairhurst. Business Analysis: Tshepo
Mekgoe, Kerassa Pillay, Pravesh Mungaldave. Information Security: Phillip Gerber,
Tian Gerber, Enzlin Burts. Network Security: Andre Jansen, Jared Camberg, Iaan Botha.
Change and Release: Amanda Kopolo, Patiwe Singapi, Stephanie van Ross, Cecil Loots,
Marty Dada, Liesl Moss.
To the Apress team – Jonathan Gennick, Jill Balzano, Robert Stackowiak, Laura
Berendson, and Welmoed Spahr – I cannot thank you enough for this opportunity of a
lifetime. It is uncanny – although we are continents apart, I have continually felt your
guidance and presence throughout the process.
Last, but not least, special thanks to Marco Vidulich and Ray Naicker for their
leadership and uncanny ability to see around corners and the courage and resolute
conviction to pioneer unchartered territory to build what has become Africa’s leading
API Marketplace.
xviii
Introduction
An API Marketplace is a key enabler for any organization with a goal of establishing
a platform business. Due to its purpose as a digital channel between third-party
developers and the enterprise, it is a delicate balancing act. Allowing access to internal
services and capability – with fine-grained control. Innovative products and solutions –
subject to organizational governance. Blindingly fast agile delivery – in accordance with
enterprise standards of quality. Liberation and democratization of customer data – with
consent. Planet-scale architectures on cutting-edge technology – with enterprise grade
reliability.
The basic premise of an API Marketplace is openness. Continuing in this spirit, the
intention of this book is to document the journey our implementation has been on,
for many years now – to share our experience, learnings, pitfalls, and solutions with
Engineering teams that are about to set out, or that may already be on a similar quest.
The approaches and solutions discussed have evolved over time and are in a continual
state of optimization. It is my sincere hope that it will accelerate other implementations
and further enhancements of those platforms will also be shared to catalyze adoption of
the practice.
Primarily intended for a technical audience, this book provides a view of an API
Marketplace from different perspectives. As a point of departure, I identify the vision
and goal of an API Marketplace – essentially the problem it solves (why?), the approach
(how?), and the roles needed (who?). I then take a detailed look at the global wave of
regulation sweeping over the Financial Services industry, which is also likely to occur in
other sectors – such as Telecommunications and Health. The purpose is to understand
the drivers for regulation and various responses from different territories to help you
define the identity and roadmap of your platform.
A new digital channel brings a new audience, and in my chapter on Consumption,
I discuss strategies to help both business and technical users understand and access
the platform. In the chapter on Monetization, I discuss the nucleus of our
implementation – the API Marketplace flywheel, as we call it – which has afforded our
xix
Introduction
xx
CHAPTER 1
API Engineering
An API Marketplace is a platform for an organization to share internal services with
third-party developers. The Application Programming Interface (API) is the mechanism
used to achieve the access. Capability is packaged into different products – for example,
to access customer data or to send messages on a GSM network. Much like a real-world
Marketplace, this is the rendezvous point between the organization (seller) and third
party (buyer) where the products are advertised and consumed.
Some API Marketplace initiatives start out of necessity – to meet regulatory
compliance – some to play catch-up with competitors, while others are purely
evolutionary. Ours started with a Vision. The aim was to empower third-party providers
to harness the capability of our enterprise to better serve the needs of our customers.
The altruistic view is that it results in a positive outcome for all participants. A win for
the organization – revenue through increased consumption. A win for our customers –
improved service through innovation. And importantly, a win for a third party – the
ability to leverage established organizational capability to build a new product or service.
As pioneers in our market, even country, we were not bound with the shackles
of project deadlines, or to meet regulatory timelines, and did not have competitors
nipping at our heels. From the outset, we were acutely aware that an API Marketplace
is a tremendous and rare opportunity to build a new digital channel to work with
external parties, but the initiative needed to sustain itself and to generate revenue. We
were fortunate to be given a blank slate and the latitude to make technology decisions
which were outside the standard convention of the organization. Our key learning is
that the foundational elements of the Marketplace are Technology, Process, and most
importantly – People.
In this chapter, we start with the enabling technology element, the API, the
capabilities it can afford, and ways in which large organizations have successfully used it.
We then discuss the API Marketplace process, its purpose, and operation relative to the
greater organization. We then move on to the people element and discuss the key roles
which underpin an API Marketplace implementation.
1
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 1 API Engineering
APIs in Action
Every night, before I go to bed, I walk up to one of the many Amazon Echo devices
scattered around my home and casually whisper “Alexa, Goodnight.” The TV, Audio
Visual (AV) equipment, and lights turn off, and Alexa whispers a sweet message bidding
me goodnight. One day, I will hopefully have a smart lock which will join that routine. To
the layman, this may seem easy to achieve – however, this is integration engineering at
its finest. It is simple, reliable, and easy to use. And it is all underpinned by APIs.
The words I spoke to Alexa were sent to a speech recognition service which
converted the speech to text. Thereafter a Natural Language Understanding (NLU)
service converted the text to an Alexa intent. The intent triggered smart home skills
which interface to my universal remote and light automation via APIs. For this seemingly
simple request, it triggered a wave of activity that probably spanned continents. Let us
zero in on the light automation piece of this scenario.
For the light automation, there is a hardware relay which responds to a radio signal
to either switch to an “on” or “off” state. To achieve this, the manufacturer created a
transmitter and a receiver. So, instead of using the traditional light switch, which is
physically embedded in the wall, I can send the request from a mobile transmitter. The
manufacturer also provided the capability to initiate the request using a mobile device.
To be honest, this was one of the key requirements for my selection of this specific relay –
as being able to turn lights on and off remotely, especially when friends are over, is every
techie’s dream. However, what really clinched the deal for me was an arbitrary reference
to an API on a lonely link in the corner of the product documentation.
The API allows direct software integration via HTTP to the relays without using the
manufacturer’s proprietary hardware interface. By exposing the API, the potential of the
relay increased significantly. Trigger events are not limited to the remote transmitter
or even the mobile application. It could be linked to sensors which determine the level
of light, motion, or occupancy. It could also be linked to external services like Amazon
Alexa or Google Assistant – and triggered by voice command. Possibilities are endless,
and the humble relay which is hidden away in an electrical duct is now a meaningful
contributor in a greater ecosystem.
And the pivotal component, which makes that ecosystem possible, is an API.
2
Chapter 1 API Engineering
the ease of the communication. It should be natural as speaking and APIs are a firm step
in that direction.
Websites and mobile applications have revolutionized how we consume
information. User Interface (UI) and User Experience (UX) define the navigation and
flow of an interface. APIs are a key enabler of front ends and allow the clear separation
between UI and logic.
4
Chapter 1 API Engineering
• The mandate closed with: Anyone who doesn’t do this will be fired.
Thank you; have a nice day!
Any organization with a decent integration strategy reading through this may not
be too concerned. After all, middleware is meant to achieve all the above – abstraction,
clean interfaces. However, the words from the manifesto “developers in the outside
world” is a game-changer.
5
Chapter 1 API Engineering
6
Chapter 1 API Engineering
With good leadership and determination, a similar but lesser-known backend was found
which we integrated into with fewer challenges. This required us to shape a new API
product around the new backend.
The key lesson learnt is that it may be prudent to start with a lower profile API
product to establish the foundations of the platform – without raising organizational
concerns (e.g., cannibalization of existing revenue streams). Lower profile could also
translate into lower consumption. This provides a perfect opportunity to define and
refine the operational processes and support around the Marketplace. In this fast-
moving realm, it is important to get an API product published and consumed as quickly
as possible.
Patterns of Integration
Integration has always been possible at different levels. Organizations connect to one
another through well-defined interfaces, possibly built to achieve a specific function.
The communication for this is also highly secured using dedicated network channels
such as leased lines. This is typically referred to Business to Business (B2B) integration.
Due to the highly sensitive nature of these integrations, these interfaces are available to a
small subset of partners.
However, a Business to Consumer (B2C) integration pattern allows an organization
to unlock customer data for many third-party providers only with the customer’s
permission. This pattern has revolutionized the integration landscape as the end
customer, the true owner of the data, decides who has access to it. The security model
which makes this possible is called OAuth and is discussed in more detail later in this
book. This has also resulted in a standardization of interfaces as maintaining individual
service contracts for each provider would be untenable.
Enterprise-wide Impact
In traditional Enterprise Application Integration (EAI), both consumer and provider
have been well within the safe boundaries of the organization. Although internal security
mechanisms are well-advised, the safety net of the “internal network” helped allay
fears that the integration was only accessible to known consumers. By building an API
Marketplace, integrations are built primarily for external consumption.
7
Chapter 1 API Engineering
This is a significant game changer and although application teams may be satisfied
by fronting the interfaces with an API Gateway, this has an enterprise-wide impact and
will require participation from various teams – ranging from Information Security to
Networks to Forensics, to name a few. Information Security signs off that customer or
organization data is only released based on specific security authorization frameworks
such as OAuth. It is important to highlight that the Information Security team is a key
stakeholder of the API Marketplace and engagement should be ongoing. Information
Security should approve every API product to ensure that the right level of information
is provided to the right parties with the right level of security. From a technical or
development perspective, it may appear to be relatively easy to expose or update an
API product to provide additional data. However, Information Security has a greater
view regarding the sensitivity of data and, as essentially the guardians of enterprise and
customer information, must always be consulted.
The Network team will also have to determine how requests, now originating from
the Internet, traverse the organization’s boundary and are routed to internal services. At
this junction, it may be necessary to pause and reflect on the gravity of establishing an
API Marketplace from the perspective of a Network Administrator.
Suppose you were the Head of the Secret Service, responsible for the safety of the
US President. If the President stayed within the grounds of the White House, your job
is simple – the parameters of the White House are well-defined: entrances, exits, staff,
visitors, etc. However, the instant that the President leaves the White House, your job
gets inherently more complex as there are significant variables to contend with.
The same is true for the Network Security team. Since the establishment of the
organization, the parameters of the network had been well defined. The firewall kept all
unwanted users and traffic out and the internal network safe. External users originated
from well-defined IP sources, possibly using leased lines. Now, here comes along an API
Marketplace initiative that provides external developers access to company resources via
the Internet! It is therefore important to keep Network Security engaged, preferably from
the start, to ensure the necessary mindset changes are made, fears allayed, and possible
technical changes can be planned for and made timeously to avoid delays.
It is also important to engage the Forensics team as they will use the audit data
from each transaction to piece together the customer request, via a third party, to the
enterprise. This is critical in the event of customer queries or disputes and could save the
organization significant amounts of money. Trace information, analyzed in real-time,
can also be used to determine and stop fraudulent requests. Forensics teams can also
leverage their experience to provide insight into how attacks could originate.
8
Chapter 1 API Engineering
There are other teams in the organization which should be consulted and informed,
such as product management. The key takeaway is – although the API Marketplace may
operate on the edge of an organization, it is supported by internal capabilities within the
enterprise. Stakeholder management is crucial and is one of the enabling capabilities
of our Platform. Education is key – take nothing for granted. At the start of all our
engagements, a YouTube video was created and replayed providing a definition of an
API, how it could be used, and the benefits. By doing this, our audience had knowledge
and context and were more comfortable to engage.
9
Chapter 1 API Engineering
to nine to twelve months. Timelines as lengthy as these are likely to kill any developer
spirit. Our move out of the digital innovation lab to make way for the new MVP kid on
the block helped neutralize the oxygen content in the air, and we soon realized that
technical delivery was just one dimension to be considered when operationalizing an
API Marketplace. We were building a new Channel into the organization!
Enabling access is an evolutionary transformation. As an example, consider the
evolution of access into a banking institution over the years. They began with
well-secured physical buildings which were only accessible during specific office
hours. By providing Automatic Teller Machines (ATMs), you could access cash around
the clock – however in establishing the capability, the machine needed to be highly
secured and well managed. The mechanism to get cash into the ATM also needed
to be considered, not only from the security perspective, but also logistically given
the geographical distribution of the machines. Fairly easy as a concept in a “lab”
environment – completely different in a real-world context.
Another step in their evolutionary journey was providing access via web and mobile
application channels. There are countless challenges – I’ll highlight just one which
probably never featured in the “lab” environment – phishing. Client login credentials
could be easily socially engineered by simply calling an end user posing to be an
employee of the financial institution. Mechanisms like two-factor authentication (2FA)
are prevalent today – however, these were not readily available when the channel was
first established.
With the experience gained from establishing other channels, organizations have
far more insight into potential vectors of attack. Attacks on a bank’s physical buildings
and ATMs may also be easier to defend as threats are tangible. With a digital channel
such as an API Marketplace, the attacker could be on the other side of the world. ATMs
could only lose cash. An API could leak customer data, which in today’s world of General
Data Protection Regulation (GDPR) could cost an organization far more in reputational
damage.
Establishing a digital channel is not a trivial exercise. This needs to be considered, not
only from a development or technical perspective, but from a wide range of viewpoints.
A single security incident can cause reputational damage but loss of trust in the platform
could potentially impact the API product roadmap, possibly its very existence.
Of all the channels, an API Marketplace is probably the fastest time to market – it is
unburdened by the need to have a physical location like an ATM and is not tethered to a
user interface like web. However, the speed must always be tempered with responsibility.
10
Chapter 1 API Engineering
Developer Ecosystem
An API Marketplace exists to serve third-party developers. Without third-party
consumption, there would be no traffic. No traffic means no revenue. Revenue sustains
the Marketplace which exists to achieve the Vision. Available API products should always
be reliable and available to sustain existing consumers. A well-defined roadmap will
help to attract new developers to the Platform.
The API Marketplace developer portal is essentially the shopfront for the Platform,
and significant effort and focus should be made here. Although primarily meant to
support technical integration, the portal should be geared to a wide audience. A startup
considering the use of the Platform and API products may want a 10,000-foot view of
how it works. Videos and customer case studies can easily convey the concept. It is also
important to cater for varying levels of developer skill. Take nothing for granted, and
concepts such as OAuth, which may be easily understood by the internal delivery team,
need to be demystified and explained to ensure understanding and adoption.
An inherent benefit of an API Marketplace is a sandbox environment. Techniques to
implement and manage this are discussed in a later chapter. From an external developer
perspective, it allows development and integration testing early in the development
lifecycle. Developer access and sign up to this environment must be achieved by self-
service and fully automated. Some developers are resilient, most may not be – access
and ease of use is a necessity. The portal should be well documented, provide sequence
diagrams to show process flow, step by step guides, and code samples. This is also
discussed in a later chapter.
Roles
At the start of our own project that led to the creation of this book, we began with a
technical-heavy team. Some of the members included front-end developers working
on the portal, integration developers assimilating backend interfaces, and DevOps
engineers building on-premises container platforms. In hindsight, I now understand
the exasperation of our agile coach who constantly tried to get the team to focus on the
greater cause rather than just meeting the next sprint target. Our project team included
personnel from several countries, across continents and time zones, and there were days
we spent more time on web conferences than with our families.
11
Chapter 1 API Engineering
As the Marketplace evolved, so did our staff complement. With the benefit of time,
we were fortunate to work in a variety of combinations – from a purely startup formation
to working with conventional team roles. Due to product demand, we needed to create
product squads – each working on a specific domain. As the Marketplace has matured
from a startup to an operational platform, the following core roles underpinned the
team:
• Program Executive
• Product Owner
• Delivery Lead
• Operations Lead
• Engineering Lead
As any fan of Star Trek will relate, these roles map to those of the Starship Enterprise.
Each is highly capable and performs a vital function, and the overall contribution
leads to successful missions. What works impeccably well is that each member has full
autonomy to execute and is always supported by the rest of the crew. Available personnel
are brought in to assist with delivery objectives – for example, the Product Owner might
scan through audit traces to help the operations team piece together a customer’s
journey when investigating a dispute. A common requirement across the team is that
everyone should roll up their sleeves and get into the detail.
As the captain of the Platform, the Program Executive steers the ship based
on objectives set out by the digital leadership of the organization. Although the API
Marketplace functions as a speed boat, it is part of a greater fleet and this role must
carefully balance the cautious outlook of an established enterprise with an agile, but
sometimes hasty delivery team. The Executive is also a champion of the API Marketplace
within the organization and has the unenviable task of securing funding for the build
and early phases of the program – until it can sustain itself. Ensuring an API Marketplace
is viewed as a serious digital channel for the enterprise is also a significant challenge. It is
important to sell the concept and capability internally, as such a revolutionary concept
could easily be classified as a research and development effort, and not taken seriously.
As adoption and revenue increases, it will become easier.
The Product Owner (PO) is responsible for shaping the API products. The technical
delivery team may underestimate the level of complexity required by a third party to
consume an API product. The PO understands the needs of the third-party developers,
12
Chapter 1 API Engineering
the capability within the enterprise, and identifies how capability can be mapped to
fulfill need. This is also to be tempered with business value as the Marketplace needs
to be self-sustaining and revenue generating. Although many API products could be
pre-defined based on regulation, there is ample opportunity to define and publish
more. The PO works closely with the Program Executive to define the roadmap of API
products. Organizational direction is one input; third-party demand/requirement is
another. A further responsibility of this role is to internally market the potential of the
API Marketplace to internal teams within the enterprise and shape offerings. This is no
mean feat as it potentially requires partial funding to be provided by that team to build
the product.
The Delivery Lead is tasked with ensuring the goals and objectives of the product
roadmap are met. Areas of responsibility include scheduling incoming requirements
from the Product Owner based on available development capacity. This person also
works closely with backend platform teams to determine the availability of interfaces
for consumption. This is sometimes a precarious balancing act as any delays from
backend teams could result in lost development time. When working with an offshore
delivery team, the Delivery Lead has the unenviable task of also liaising between remote
and local personnel. With the insight into backend availability and delivery capacity,
it may also be necessary to shift the release date and update of API products. The aim
is to keep the platform constantly moving. In the development process, the rigor of
bi-weekly production drops helps immensely. These can be intentionally timed to
coincide with the end of a delivery sprint. The drops not only maximize the potential
of the development team – but the team is aware their efforts are constantly moving to
production and any resulting issues or updates can be done quickly.
The Engineering Lead (EL) works across the various technology areas of the
platform. Being intimately aware of each layer in the stack is an advantage as it is
often necessary to dive in and get involved in the detail to unblock an issue. An API
Marketplace also provided us with the unique opportunity to test new approaches and
technology within the Enterprise. The EL is tasked to have a detailed understanding
of the technical landscape and is often called upon to share this view with supporting
teams within the organization. A further responsibility, personally a privilege, is to
define solutions which meet new requirements with input from other members of the
team and input from backend platform teams. From a governance perspective, the EL
also works with enterprise, domain, and solution architects for the approval of platform
and solution designs. The EL must have a full view of the end-to-end solution, be able
13
Chapter 1 API Engineering
to decompose it into work items which can be delivered by the team. What works well
is an EL who can, and often does, get into the detail – from writing code to create a
quick proof-of-concept to consuming a new backend platform interface to mediating
between developers during integration testing. The EL is also responsible for scoping the
effort and timelines of delivery, with assistance and input from the Engineering team.
Experience plays a big part as this will help to support the definition of the API product
roadmap.
Finally, the Operations Lead (OL) is essentially the pivot point of the team.
Although the primary focus is on the reliability and stability of the Marketplace
execution platform, this role carries accountability for the availability of supporting
organizational services and backend platforms. The Marketplace support team reports
into the Operations Lead. Reporting and analytics dashboards, discussed later, are a
mainstay for this role. For day-to-day operation of the Platform, resolution of outages,
integration, and coordination with external teams is a key requirement. The ability to
understand the complexity and dive into the detail is also mandatory as it allows the
individual to know who to pull in when. From a revenue generating perspective, this is
possibly the most important role since downtime translates to lost opportunities.
Finally, it is important to highlight the following: the roles are interconnected.
The Product Owner is supported by the Engineering Lead to determine if a potential
API product is viable. Similarly, the Engineering Lead relies on the Product Owner to
communicate delivery delays to the Program Executive. Hierarchy is also kept to an
absolute minimum, and all team members are free to engage with anyone in the above
roles to fulfill an objective. Again, what binds the team together is mutual trust and
respect and most importantly, we all share the same Vision. Everything we do is a firm
step forward in the journey to achieve that objective.
14
Chapter 1 API Engineering
15
CHAPTER 2
Regulation
The Financial Services (FS) industry has always been a trailblazer with regard to
technology adoption. This is evident from the launch of Automatic Teller Machines
(ATMs), to telephone banking to web-and-mobile application-based banking. Given
the sensitive nature of customer data and associated transactions, the gateway to FS
providers has been well guarded – and understandably so. In this chapter, we examine
the factors which led to customer data and financial backend services being shared with
third parties, which has revolutionized the industry. Like tectonic plates colliding in the
middle of the ocean, the tsunami effect has been triggered, and the wave of change has
reached many geographies across the globe.
It stands to reason that if API Marketplaces are required and can be established
in such a stringent sector like Financial Services, then other sectors, such as
Telecommunications and Healthcare, can and will follow suit. In this chapter, we deep
dive on the impact of APIs on the Financial Services sector. We start at the epicenter of
this seismic event – Payments – and then move on to Open Banking and finally examine
the effects of further shockwaves on the industry in the form of Open Finance.
B
ackground
Digital payment services have underpinned the e-commerce boom. From simply
capturing credit card details to paying for the items in an electronic shopping basket, the
capability has improved significantly. On the face of it, the participants in the transaction
should simply be the end user, the online retailer, and the Financial Institution. Due
to the myriad of banks, complex agreements, and interfacing mechanisms, innovative
Financial Technology (FinTech) companies have established themselves as a new,
integral participant by stepping in to abstract the complexity and providing an easy to
consume service for online retailers.
17
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 2 Regulation
One such service is payment initiation. Figure 2-1 shows how an online retailer
can simply integrate into a single payment provider which can leverage its network of
interfaces into various banks instead of directly integrating with each bank.
Screen Scraping
Using the online banking channel, third-party payment providers have been able to
achieve integration into banks through the practice of screen scraping. Screen scraping
is the technology that reads and extracts data from a target website using computer
software that impersonates a web browser to extract data or perform actions that users
would usually perform manually on the website. To make the payment, the customer
would provide their banking credentials (username, personal identification number
(PIN), and password) with the provider, who would use this information to kick off an
automated process to log in to the user’s online banking portal and make the payment.
A benefit to the end user is convenience – it saves time connecting to the online
banking portal, capturing the banking details of the retailer, setting up a payment, and
sending confirmation of payment. The process is also streamlined to fit neatly into the
checkout journey, and most customers do not know that they are logging on to their
online banking directly. As traditional interbank electronic funds transfer (EFT) can take
several hours, even days to reflect, a benefit to the merchant is that the payment provider
can offer confirmation of payment in real time. As the payment provider connected
to the user’s online banking portal, verified funds and performed the transaction,
18
Chapter 2 Regulation
the merchant can be assured that the payment was done – instead of relying on a
confirmation of payment provided by the end user, which could be subject to fraud.
The inherent drawback of this practice is that accessing a customer’s financial
information using screen scraping has generally been found to be less secure from a data
privacy and consumer protection perspective. As it poses risks to the integrity, safety,
and efficiency of payment systems and to the customer, there have been a growing
number of interventions from banking regulators to curb this approach.
Screen scraping allows the practice of sorting at source. This allows a payment
provider with bank accounts with a number of different banks to sort the payment
instruction per bank and relay them on to each respective bank – which would in turn
process them as internal transactions. Although sorting a source model may sound like
a more optimal way to reduce costs and increase the speed of clearing, it is prohibited
under certain regulatory policies and rules as it reduces interbank clearing. Screen
scraping has been a popular mechanism of payment initiation and account aggregation
because of a lack of legal frameworks and policies in the banking sector that allow the
sharing of customers’ financial information securely with third parties.
Open Banking
Due to increased demand from customers for access to and control of their data and
from third-party providers eager to disrupt, the banking industry faces an imminent
revolution. Open Banking presents an opportunity for a graceful, controlled transition
and, more importantly, for banks to remain a vital part of the new ecosystem. Customers
have greater control of their financial data, allowing them to make more informed
decisions and better manage their money. Increased competition will result in broader,
more diverse service offerings and innovation from third-party providers and banks
alike.
Objectives
We consider some of the objectives for an Open Banking policy:
20
Chapter 2 Regulation
T erminology
When navigating Open Banking regulatory frameworks, you may encounter many new
terms and classifications. We consider the most common ones and discuss how they fit
into the framework.
Figure 2-2 provides a visual representation of the terms and classifications and how
it fits together.
21
Chapter 2 Regulation
Benefits
Open Banking can provide a number of benefits to all participants in the ecosystem.
Customers can enjoy a less admin-intensive, more streamlined online retail experience
by leveraging payment services. This saves time previously needed to log on to banking
portals and sending confirmation of payment. Account aggregation services allow easier
comparison and switching. The sharing of transactional data with third-party providers
is also safer as the customer has fine-grained control over which data is shared, the
duration and the ability to revoke access. Access to account history can allow third
parties to offer personalized products and services and allows more accurate risk ratings.
Payment methods, such as mobile wallets, are also available as an alternative to card and
transactional account payments. Consumers also benefit from increased competition as
this will potentially lower fees for financial services and raise service levels.
Third-party providers have more business opportunities as Open Banking creates
a level playing field for non-bank providers. This will allow them to offer innovative
account and payment solutions that could improve the customer experience. Insight
into a customer’s historical account data could allow better risk rating and product
matching.
22
Chapter 2 Regulation
Although it may appear, at first glance, that Open Banking will impact banks
negatively, there could be many benefits. Customer trust can be maintained by engaging
in a transparent, open relationship by providing the capability to easily and safely
share data and control how money is managed. Confidence can also be instilled by
demonstrating digital capability and embracing innovative solutions, with the necessary
security controls, to offer customers optimal or premium products and services. Banks
can create new partnerships and access new revenue streams through an API-based
platform type business model. The reach of the bank also increases as the products
and services of third-party providers could reach a wider audience in shorter, more
aggressive timeframes.
Merchants can also grow their product offering and extend reach to markets that
were previously difficult to access. An example could be the ability to make a payment
from a transactional account which would allow access to customers without a credit
card. Alternate payment methods could also result in lower card transaction costs. Open
Banking has the potential to eliminate various fee elements of card transactions that are
part of merchant service charges from the issuing banks, processors and schemes, which
is also a benefit for customers.
The payment system benefits from increased competition as the levelled playing
field will potentially bring innovative payment solutions. Open Banking can enhance the
transparency of payment flows by removing fake and fraudulent third-party providers
and building technical and data-sharing standards. It also allows a more efficient
infrastructure that underpins payments that are efficient for clearing and settling
transactions.
Risks
There are a number of risks associated with Open Banking implementations. Awareness
and upfront mitigation are key to enable the Marketplace to deal with these challenges.
As the solutions are digital, this could result in exclusion for those customers who
do not have access to the Internet or smartphones. Any new channel into a financial
system introduces the possibility of fraud. A customer’s financial data could be used
for purposes that are not mandated by the customer. Open Banking could expose a
customer’s data to theft and inappropriate use. Weak security measures could result in a
loss of funds due to criminal activity.
23
Chapter 2 Regulation
Customers may not understand the risks when sharing their financial data and the
limited liability accepted by many third-party providers. This may be addressed through
a strong customer education campaign. In addition, the messaging and warnings must
be clear and concise during the customer consent process. Customers should also be
made aware of the mechanisms available to view and revoke third-party access.
Third-party providers are not subject to the same regulations as banks and could
expose banks to reputational risk through the mishandling of data. Sensitive customer
data could be shared through accidental or malicious employee activities. Third parties
may be easier targets for cyber criminals as their security mechanisms may not be as
comprehensive as banks. Initial, scheduled and spot reviews of third-party systems and/
or independent security assessments could ensure the necessary security controls are
established. Depending on the nature of the API product consumed, this could be a
mandatory requirement.
Implementation and operation of a product or service which consumes Open
Banking APIs requires a significant investment from new entrants with regard to design,
development, support, and maintenance. This should be clearly communicated to
potential providers by the API Marketplace Product Owner.
Banks also face reputational risk through fraudulent or rogue third-party activity.
Unauthorized use of consumer data can have a negative impact on consumer trust in the
bank. This could be mitigated through thorough review and screening of third parties
wishing to integrate into the Marketplace. A pre-emptive strategy is to communicate
a strong market message ensuring customers and third parties are aware of security
responsibilities throughout the Open Banking journey.
One of the most significant risks faced by banks is disintermediation. Third-party
providers may reduce the bank’s role, potentially leading to partial loss of customer
relationships, which could in turn lead to loss of revenue. Open Banking, like ATM,
online or app-based banking, is a channel that a customer uses to interact with the bank.
A strong bank-customer relationship will help establish loyalty and trust. Banks can use
customer data and activity, via any channel, to better understand behavior to provide
personalized products and services. The potential of disintermediation could be viewed
as motivation for banks to raise their game to retain the customer relationship.
Open Banking will result in a change of business model for banks as there are
significant changes to operational infrastructure, onboarding, transactional monitoring,
and security checks. This could increase costs for banks and result in competitive
challenges. This is best mitigated through a forward-looking view of the financial
24
Chapter 2 Regulation
services landscape. A clear and well-defined roadmap, which takes into consideration
the experience of other countries and organizations further ahead in their journey, will
help ensure the readiness of banks to enable Open Banking.
Merchants may have to contend with the exposure to reputational risk if customers
lose their data or payments are intercepted, third parties not able to honor financial
obligations and transactions originating from fraudulent activity. Payments systems may
be subject to operational risk in the event of a system malfunction, human error, and
cyberattacks. This may affect integrity and confidence in the payment system. Access to
banking APIs may allow more third parties to sort-at-source which reduces interbank
clearing, which will impact interbank clearing houses.
25
Chapter 2 Regulation
Approach Prescriptive
Lead Treasury Department
Service Phased Approach. July 2020 – four big banks. February 2021 – other banks
providers
Access type API
Product scope Credit and debit cards, deposit and transaction accounts, mortgage and personal
loan data
Status • 2018: Australian government approved a framework for Open Banking
• July 2020: Implemented in a phased approach, with the four big banks legally
required to make consumer usage data available to consumers on credit and
debit cards as well as deposit and transaction accounts
• November 2020: Mortgage and personal loan data to be shared
• February 2021: Other banks to start sharing data
26
Chapter 2 Regulation
Approach Market-driven
Lead FinTechs
Service AliPay, FinTechs
providers
Access type API
Product scope As per the consumer (any financial data)
Status • Open Banking is not being promoted by regulators but rather driven by FinTech
companies
Approach Prescriptive
Lead EU Commission
Service providers All banks and payment service providers
Access type API, Screen scraping
Product scope Current and savings accounts
Status PSD2 directs banks to open up their systems to allow third-party access to
certain customer account information, in order to make payments on their
behalf (via credit transfers) and to provide them with a view of their various
payment accounts, subject to customer consent
• The aim is to increase competition and promote innovation through data
sharing
27
Chapter 2 Regulation
Approach Facilitative
Lead Hong Kong Monetary Authority
Service 20 participating retail banks have made available more than 500 open APIs, offering
providers access to information of a wide range of banking products and services
Access type API
Product scope As per the consumer (any financial data)
Status July 2018: The Hong Kong Monetary Authority introduced the Open API Framework.
It aims to facilitate the development and wider adoption of APIs by the banking
sector
January 2019: Phase I of the framework launched
28
Chapter 2 Regulation
Approach Prescriptive
Lead Financial Services Agency
Service All banks
providers
Access type API
Product scope Bank accounts (current, savings, deposits)
Status In 2018, Banking Act was amended to require financial institutions to develop APIs
for use by third parties
Approach Facilitative
Lead Monetary Authority of Singapore
Service Voluntary participation
providers
Access type API
Product scope Ethical use of data and artificial intelligence that will work for all players within
the system
Status Singapore is attempting to implement a different type of regulatory framework,
with a less aggressive and more organic approach. It is not planning to force
regulations onto financial institutions
29
Chapter 2 Regulation
Approach Market-driven
Lead South African Reserve Bank (SARB)
Service providers Voluntary participation
Access type API, Screen Scraping
Product scope Under review
Status Currently, the SARB does not regulate, supervise or oversee Open
Banking activities such as screen scraping and open APIs, including their
effectiveness, soundness, integrity or robustness
The SARB is of the view that Open Banking activities should be regulated
and reformed, risks should be managed, and safety considerations
embedded, all the while ensuring that customer experience is ensured and
enhanced
Consultation process currently underway
Approach Market-driven
Lead Consumer Financial Protection Bureau
Service providers Voluntary participation
Access type API, Screen scraping
Product scope As per the consumer (any financial data)
Status There is no legal requirement for Open Banking, and the decision on how data
sharing occurs is up to financial institutions
Entities still use screen scraping rather than Open APIs. This includes web-
based financial management tools that aggregate a customer’s financial data
30
Chapter 2 Regulation
31
Chapter 2 Regulation
Sample Applications
Open Banking and Finance has enabled banks and third-party providers to launch
new products and services. We highlight a few of these applications – YOLT which was
built by a bank, CHIP which use cutting-edge Artificial Intelligence (AI) technology,
bunq which uses Open APIs to extend their existing product offering, TrueLayer which
provides a platform capability to third-party providers to abstract integration complexity,
and Revolut which provides an account aggregation capability across banks.
32
Chapter 2 Regulation
The speed, low costs, and innovation of FinTechs have helped to extend existing
capability and to build digital applications and platforms.
• bunq: bunq, long before PSD2, opened up their API. bunq let
developers build unique apps that enrich the life of all bunq users
on top of a fully licensed bank. Using the bunq API, developers can
connect to transactional data, push notifications, payment requests,
cards, joint accounts, and limits and budgets.
• Revolut: With the new feature, German customers can now connect
their accounts at Comdirect, Commerzbank, Deutsche Bank,
ING-DiBa, and Sparkasse with the Revolut app and view all their
finances in one place – directly from their smartphones, developed in
cooperation with Europe’s provider of financial APIs (programming
interfaces), UK-based FinTech, TrueLayer. The use of the TrueLayer
platform ensures that account information from major German banks
is securely integrated and updated in real time in the Revolut app.
33
Chapter 2 Regulation
Summary
In this chapter, we reviewed how Open Banking and Open Finance has come to the
fore in the Financial Services industry. It has essentially been driven by having the
best interest of the customer in mind. Practices such as screen scraping jeopardize
the security of the customer through sharing of credentials – APIs are a mechanism
to remedy this. New payment methods and account aggregation will allow more
convenience for customers and personalized service – specifications, such as PSD2,
have enabled third parties to achieve this. More competition in the market could allow
more customer choice, drive down costs, and improve service levels – Open Banking
standards were introduced to do exactly this.
We extolled the benefits to all participants – from the promise of financial inclusion
to billions of unbanked across the globe to levelling the playing field for third-party
providers. This movement is not without risk – and we have highlighted some and
provided potential mitigation. What is extremely exciting at this time is that the wave
of Open Banking is spreading globally. Although different territories have adopted
different approaches across various product sets, the primary objective across all is the
democratization of customer-owned data.
We have also highlighted that this is just the beginning. Open Banking is the herald
of a greater Open Finance initiative which will have an impact on more sectors within
the Financial Services industry. This allows an unprecedented opportunity to re-
design financial services for maximum scalability and efficiency. The golden thread
tying everything together is regulation. A key objective regarding regulation is that data
sharing and Open Banking should strike a balance between risk management and
incentives for promoting innovation. Regulatory frameworks should set clear roles and
responsibilities in line with market changes.
Although some organizations have been pro-active in building the capability to
enable Open Banking, many were not prepared. A well-planned and executed API
platform strategy can provide an organization with the pre-requisite knowledge and
experience to participate in and guide the regulatory consultative process.
It is indeed interesting to note the ripple effect from a single requirement,
specifically payment initiation, trigger the next change, which is access to customer
account information. This brought about regulatory changes which essentially forced
organizations to change their policies and allow access to third parties, with customer
consent. The fracture has not stopped there – this has spurred change in other areas of
financial services, such as insurance and lending.
34
Chapter 2 Regulation
35
CHAPTER 3
Consumption
One of the key areas which requires a significant amount of attention is the interface to
the API Marketplace. Although the star of the show is the actual API which provides the
functionality, the star needs a stage and theatre to perform. If the stage is too small or the
theatre too difficult to access, then the brilliance of the API will be lost. It is important
to always keep this in mind throughout the journey. Without third-party consumption,
there would be no traffic. No traffic results in no revenue. Revenue sustains the
Marketplace which exists to achieve the Vision.
The Marketplace provides Products which can be consumed by multiple third
parties. Some products or APIs essentially sell themselves due to regulation or demand
for specific functionality. However, most of the products must be actively marketed
to showcase their capability and to encourage adoption and usage. We discuss
mechanisms to achieve this in the sections below.
37
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 3 Consumption
Marketplace is one which abstracts and simplifies the complexity of backend platforms
and packages it for easy consumption.
An API Marketplace is not your typical, run of the mill, integration “plumbing”
exercise, connecting one system to another. The API exposed to consumers must be
thoughtfully and carefully constructed. As mentioned in the Amazon “API Manifesto”:
All service interfaces, without exception, must be designed from the ground up to be
externalize-able. That is to say, the team must plan and design to be able to expose the
interface to developers in the outside world. No exceptions.
Personas
A pitfall many organizations fall into is to only have a technical portal with rafts of
three-letter acronyms. In our race to build a Minimum Viable Product (MVP), we did
exactly that. Our landing page had some vibrant icons and graphics with some terse
text hurriedly put together while we focused on the technical aspects. Again, from
experience, the first iteration of the portal the team puts out will probably be the longest
running as the team’s focus switches to making new API products available.
Due to its nature, it is easy to categorize an “API Marketplace” as technical and to
only focus on Engineers and Integration Developers. It is also important to consider
the Marketplace from a commercial perspective and how it can be leveraged to provide
business value. Companies are essentially trying to build new products and services
to solve old problems in more efficient and convenient ways. Consumers need to
understand the intention and benefits of an API Marketplace to determine how they can
use it to achieve their organization’s objectives.
Although User Experience (UX) in an API construct may seem superfluous, it is an
essential element of the Marketplace adoption. UX for different personas helps provide
pertinent information to the right audience at the right time. This could be achieved as a
separate portal or as clearly defined sections in a single portal.
In the next sections, we consider meeting goals for business and technical personas
across these areas:
• Attract: Grab the attention of potential users of the Platform, cater for
a wide spectrum of user – from established organizations to FinTechs
and Startups.
38
Chapter 3 Consumption
• Lead: The owner of the domain who is responsible for the content
of the portal which supports other initiatives inside and outside the
organization.
B
usiness Value
The first viewers of your organization’s API Marketplace Portal will most likely be
from a business development perspective. This individual or team will review the API
products to determine fit as a foundational element for a product or service still being
conceptualized or built. Figures 3-1-1, 3-1-2, and 3-1-3 are a great example that illustrate
how Twilio has achieved this for its Messaging API.
39
Chapter 3 Consumption
40
Chapter 3 Consumption
41
Chapter 3 Consumption
Figure 3-1-3. Benefits of the service expressed without any technical jargon
In the following sections, we review the key areas to be considered when building the
“Business Portal” of your API Marketplace.
Attract
Although you can use a “Field of Dreams” strategy of “If you build it, they will come” – it
may be more effective to actively market the Platform. Posts on social media, launch
events, articles, and interviews on Technology, Entrepreneurship, and Startup websites
will help draw potential users in. The key message on your main page, possibly the
first thing a user sees, is your “elevator pitch” – how can our API Marketplace help
your organization? This could include a 2- to 3-minute video, showing at a high-level,
preferably in a non-technical context, how the Marketplace provides services and
capabilities upon which new products can be built.
42
Chapter 3 Consumption
Be sure to extol the benefits of adoption. This can be done through motivation, “by
using our platform today, you have a first-mover advantage to power your business
and leapfrog the competition,” or through fear – “in Europe, governments have issued
regulations that require all banks to abide by the Payment Services Directive by the end
of 2018. Our government is investigating similar regulation.”
Educate
An empowered third party will understand the purpose of the platform and can
leverage the business capability for commercial use. Your audience, at this time, may
not have any technical background. Metaphors and analogies are important to convey
the key messages. Explainer videos detailing core concepts such as “What is an API?”
and “What can you do with it?” will help considerably. Test the use of this material
when communicating with internal backend teams. As the delivery team is constantly
immersed in the detail, it may be easy to take for granted certain concepts and functions
around APIs. Be sure to keep in mind that there is a relatively steep learning curve for
those new to APIs.
Case studies detailing the journey of users of the platform successfully leveraging
APIs to launch new products and services will also help potential customers understand
how the Marketplace can be used to achieve a business purpose. It may also help to
provide details around the time and effort required to use the platform. Be sure to
provide accurate information as being too optimistic may result in the third-party setting
unrealistic launch timelines leading to integration fatigue. Being too pessimistic may
result in the platform not being used. Encourage iterative adoption of Products. It would
be more beneficial for both consumer and provider, to start and finish with one or a few
products than starting with many products and later abandoning the effort.
Focus on business value instead of API products. For example, a Customer API
which returns the name and address information of a customer can be used for identity
verification. It could also be used to streamline the registration or sign-up process for
third-party applications. Highlight that onerous registration forms result in high drop-
offs for potential users and the Customer API could help alleviate that. Similarly, an
Accounts API can be used to determine a user’s financial behavior, which can result in
better or personalized service offerings. In developing countries, where the concept of
API Marketplaces is only beginning to emerge, highlight the value that has been created
in other markets which have an active API ecosystem.
43
Chapter 3 Consumption
Mailing lists and regular blog posts will also help keep current and prospective
customers engaged. This will also help to define the product roadmap. The Product
Owner can use these communication streams to determine interest or potential uptake
of a new API. Third parties can also be made aware of new versions of products, releases,
and patches.
As an API Marketplace is constantly evolving, customer education is an ongoing
activity. This is one of the greatest rewards of working on the Platform – the cycle of
innovation and optimization never stops. You need to ensure that the users of the
platform can leverage its full potential.
Build Trust
Consider the API Marketplace from the perspective of a potential third party. This
entity is potentially using the Marketplace as a foundational element of its business
operation. The consequences for the organization could be catastrophic if there are any
stability or reliability issues with the platform. What has helped our implementation
adoption considerably is that we have a nationally trusted brand with millions of
customers behind our Marketplace. The members of our team are always aware that this
relationship is reciprocal. Any issues or fallibility of our platform could impact the trust
and brand of the organization we represent. I like to consider the trust earned through
this mechanism as “inherited.” Essentially, you trust me because you know my parent.
I believe trust should also be “earned.”
This can be achieved by having a close relationship with the users of your platform.
During early or pilot phases of the platform release, work closely with third-party
providers. When launching a recent product, we had weekly, sometimes daily, calls
with an enthusiastic Developer. This interaction not only helped us flesh out issues with
the API Product we were releasing but provided insight into the use of the product. The
confidence of the external development team in the product also improved significantly
as they could see the commitment from the provider. Word also tends to spread quickly
in FinTech and Startup communities.
Adoption of your Platform will be impacted by positive and negative feedback.
Endorsements from established third parties, preferably in their own words, in the form
of a customer testimonial, may help convince potential users to use your Marketplace.
Again, these are not easy to attain, and there may be a significant amount of work from
the full team to achieve this. Reference customers will also help establish trust. Implicit
44
Chapter 3 Consumption
trust can be secured if potential users of the platform see a known brand or product
which uses the platform. It is important to identify and target one or more established
brands who must be actively engaged to use your Marketplace. A key lesson we learnt
out of practical experience regarding timeframes is if you are aiming for your Platform
to be used by Black Friday (fourth Friday of November), you need to start integration
activities by June.
A key construct of an API Marketplace is a partnership between Marketplace and
third-party provider. As indicated previously, the Marketplace requires consumers of the
Platform to survive. It is important to highlight that another key partnership is between
the Marketplace and the end user of the organization. The end user places their trust
in the Marketplace to only allow access to information or data to third parties that they
have granted permission to. To the API project teams reading this – be aware this is not
only a massive responsibility to uphold, but also an incredible honor as your efforts
enables this three-way relationship.
Transparency
Strong, enduring relationships require transparency. Although third parties are
consumers of the Marketplace, be sure to remember that they are intrinsically linked to
the success or failure of the platform as much as the internal team. The simple reasoning
behind this statement is – if the Marketplace fails, it will impact their organization,
possibly their ability to continue operating.
Be honest about timelines. Marketplace launch, API product capability, availability,
and roadmap. This may not always be possible due to competitive pressure. But always
aim to under-promise and over-deliver. A key lesson learnt early in our journey is that
we should always be one step ahead of our developer community. With the launch
of our Marketplace, many third parties signed up to use the Platform – far more than
anticipated. Unfortunately, some of the API products in our Marketplace were not ready
for commercialization due to internal approvals required. In hindsight, it would have
been prudent to remove those API products from our catalogue or clearly indicate in our
portal that timelines for commercial availability were still to be established.
Pricing – in the form of costs or incentives – should be clear, unambiguous, and free
of fine print. The third party will most likely have to invest time and money to consume
the products of the API Marketplace. In addition, the third party will also need visibility
into the costs of using the platform. That is, if the costs are per transaction, tiered or
45
Chapter 3 Consumption
flat. There could also be an incentive to use the Marketplace in the form of a lead or
referral commission. Essentially, the third party requires as much financial information
as possible to determine the commercial viability of engaging with your Marketplace.
During the early phases of the Marketplace, it may be necessary to allow free access to
APIs to stimulate adoption. Be sure to communicate to consumers that this is subject
to change and will be reviewed later. If pricing is simply not available, due to external
factors, be sure to clearly indicate this.
Service-Level Agreements (SLAs) and resolution timeframes must be clearly
defined. The inherent benefit is that the SLAs can be used across several providers.
These can be tiered – higher tiers would receive more support and faster resolution –
albeit at a higher cost. Upfront agreement also sets the correct expectations regarding
resolution and will significantly assist the Marketplace Support team when fielding
operational queries. Again, be sure to be honest regarding resolution times – as too
optimistic timeframes will result in a loss of confidence with prolonged outages and too
pessimistic an outlook may impact adoption and confidence. Where unclear or still to
be defined, clearly indicate as such and ensure clear communication in the event of an
operational issue.
Collaborate
Consider offering one or a few obligation-free consultation sessions. This is especially
the case in developing markets where prospective customers want that extra reassurance
by discussing questions or scenarios in person. From experience, technical support
teams may not be the best suited to assist prospective users at this point in the customer
journey. The Product Owner, with support from the technical team, should facilitate
these sessions. Technical teams will be able to assist with development or integration
queries. However, the Product Owner will be able to position the Marketplace for
commercial success.
A register your interest lead-generation form is a necessity. A follow-up email or
phone call within 24 hours is mandatory. FinTechs and startups operate at incredible
pace, and the potential opportunity is at risk of being lost if not followed up on
timeously. During the follow-up, the Product Owner will be able to determine the
maturity of the prospect, where the organization is in their journey and the level and
area of support required (including whether the questions are commercial or technical
in nature).
46
Chapter 3 Consumption
L ead
This effort is best led by the Product Owner (PO) as this will form the foundation of
the sales pitch for external consumers. The PO will also extol the benefits of having
representation in the Marketplace to internal platform teams. Always keep in mind that
an API Marketplace has many consumers – a Business and Technical audience from
external organizations. Knowledge gained from these relationships can also be used to
demonstrate capability to internal teams and to stakeholders. Be sure to give this the
right level of attention and focus.
47
Chapter 3 Consumption
Figure 3-2-2. Technical instructions and code samples for API consumption
48
Chapter 3 Consumption
We consider the following areas to build a Marketplace that your developers will
believe in and be loyal to.
Attract
Technical consumption of the API Marketplace may be the result of a second wave of
review, the first being a business development assessment. The technical team will be
tasked with providing an impact assessment to integrate into the Marketplace. Criteria
such as the standard of documentation, self-service, sample code, availability of test
data, and developer support will be examined. The feedback from this assessment will
help determine timelines and cost to integrate.
Although the goal of an API Marketplace is to attract third-party providers to
the platform, this needs to be tempered with a required minimum level of skill and
experience. Be sure to keep this in mind when defining your target audience. The risk
of bringing in novice or junior developers is that the team will have to provide more
handholding and support.
User groups and community sessions can also be used to demystify the concept of
an API Marketplace and to introduce interested developers to the platform. As the goal
of an API Marketplace is to democratize access to data, consider entrepreneurs who
could consume the products to launch a diverse set of applications. Hackathons are an
excellent mechanism to encourage participation and to stimulate interest. A positive side
effect is that they could help you find talented developers to join your delivery team.
A novel approach we observed from an implementation was the engagement of an
external organization who invited a diverse set of developers to a 3–5-day bootcamp.
During this time, the developers were paired with an expert for support and built an
application which used the API Marketplace.
FinTechs and startups are also eager to consume APIs to bootstrap application
delivery. Be sure to post articles in sites frequented by such organizations and encourage
participation. Marketplaces are viral and if the developer experience is positive, word
will spread. It is important to build and foster a developer community, and this needs to
be a key goal for the API Marketplace.
49
Chapter 3 Consumption
Educate
Technical consumption of an API Marketplace requires at a minimum intermediate
developer experience, preferably 2–3 years of hands-on coding or integration experience.
Although you can educate novice developers, I do not think that the objective and
material of the portal should include tutorials on how to make REST API calls. There are
great online tutorials which will help developers come up to speed with APIs.
However, be sure to cover API Marketplace specific concepts, such as OAuth, in
blueprints. Delegated authorization, which is one of the basic tenets of a Marketplace,
must be clearly and concisely detailed and explained. We have had many new API
consumers who did not clearly understand the process flow until they could trace the
calls against a sequence diagram. Many integration developers are only familiar with a
client ID/secret pattern.
For each of the API products, try to provide code samples in many programming
languages. Some of the benchmark developer portals provide samples in: [Link], C#,
PHP, Ruby, Python, Java, and cURL. One of the greatest benefits of an API Marketplace is
the neutrality of access – HTTP. Be sure to leverage this to accommodate a wide range of
developers. From personal development experience of consuming a product from one
of the major cloud providers, code labs can make a massive difference. Code labs are
different from code samples as they step a developer through the process of consuming
an API. Think of a code sample as a ready-made cake and a code lab as a recipe.
As the marketplace matures, consider providing patterns or recommended practices
for integration. A typical example is consuming APIs from a mobile application. Given
that a wide range of providers may have similar challenges with integration, providing
a pattern will help ease the integration friction and allow easier consumption of your
API. The answer, in case you’re wondering about consuming APIs directly from a mobile
application, is never to store credentials in the app but rather to use user-authenticated
tokens to make the API calls.
Blog posts and podcasts are also an excellent way to stay connected to your
developer community. These tools can be used to share details of your Marketplace
journey and to give users a view into your roadmap. Raise and address hard-hitting
issues in the podcasts – such as timelines for regulation and how to plan accordingly.
These give greater insight into the internal working and operation of the platform.
As the platform matures and scales, consider developer certification. It does not
have to be an extensive program – but just a basic theoretical assessment and practical
50
Chapter 3 Consumption
exercise to ensure that a developer grasps the concepts of the Marketplace. This may
become a mandatory requirement for more sensitive API products.
Finally, a downloadable Postman collection will help potential developers
immensely. Postman is regarded as the de facto tool for API development and is
discussed later in this chapter. Be sure to include documentation detailing each value of
the collection with a step-by-step guide. The Postman collection is approximately 40% of
the effort. The remaining 60% is the accompanying documentation. If possible, consider
enlisting the services of a technical writer to help compile this material. Unfortunately,
some of the best developers are not necessarily the best at providing documentation.
Build Trust
Trust, in a Developer Community, must be earned. This can be achieved by paying
attention to the detail and insisting on a high standard of delivery. By assisting
developers with challenges they cannot solve on their own using the available technical
literature, developers will feel supported. Timely response to support requests is also
mandatory. Prompt feedback – even as simple as “we are investigating and will get back
to you” is essential. With that in mind, it is imperative that there are processes within the
support team that allow development issues to be escalated and attended to.
I would like to highlight that developer support is a balancing act. As much as we
want to support developers in consuming our Marketplaces, we would like our customer
base to be self-reliant as much as possible. That is – the first port of call should be the
documentation of the Portal, and then if there is still a significant gap in understanding,
a question should be raised on the developer forum to solicit community feedback. If all
else fails and the consumer is convinced there is a problem with the internal functioning
or something that they cannot solve without intervention from the Marketplace
team, a query should be logged. In addition, the query should include details of their
troubleshooting and investigative efforts as well as their reasoning to believe it is an issue
outside their sphere of control. This may seem like a tall order – however, having a strong
developer community not only alleviates pressure on your Support team but also raises
the bar for the overall standard of the Marketplace. That is, the quality of API products
will improve as it will be subject to more challenging review from consumers.
It is also essential to walk the talk. If an API Marketplace is a new digital channel to
access data, your processes should also be digital. There is nothing more frustrating for
a developer whose curiosity has been piqued to not have immediate access to get their
51
Chapter 3 Consumption
hands dirty. An example is having a fantastic developer portal which outlines amazing
functionality and capability with a Schedule a chat or Contact us form. Self-service is an
absolute necessity. I would like to highly emphasize this as it allows a seamless transition
from conceptual to tangible.
By providing immediate access to functionality, your API Marketplace moves from
a categorization of “marketing/vaporware” to tangible code. Speaking from experience,
developers detest vaporware. Skepticism immediately increases and scrutiny to find
chinks in the Marketplace armor intensifies. Be sure to allow immediate self-service
access, at least to a Sandbox/Simulated environment, when an API product is released.
Transparency
Open, unambiguous access to information is also a way to keep the trust of your
developer community. Provide insight into the API Product roadmap as much as
competitive pressure will allow. Third parties can use this information to plan and
schedule their releases accordingly. If possible, consider a consultative process with
third parties regarding potential API products to determine potential demand/uptake
early in the product lifecycle. This will help direct efforts/focus on APIs which will be
readily consumed. Although a catalogue with hundreds of API products is impressive,
if there is minimal use or uptake across most of the APIs, it only serves to increase the
areas to support and maintain and diverts attention from APIs which are used more.
Consider a beta program which allows early-stage API product access to a subset
of trusted third parties. This process will allow the team to optimize and refine the
product – from shaping an interface to performance engineering to updates in
documentation in a safely demarcated “staging” environment. The beta tag provides a
clear indication that the products are still under construction. When our Marketplace
was launched to the public, our Product Owner skillfully included the “beta” reference
to allow us room to maneuver during the early phases of our launch. With permission
from Information and Network Security, it may also be possible to connect beta release
APIs to internal Quality Assurance (QA) backends to allow for more in-depth integration
testing. This should be done after serious consideration as providing third parties access
to an internal environment could open a Pandora’s box.
A novel feature observed on several established Developer Portals is an API status
page, which is also available as an API. This allows consumers to tap into your operational
platform and the ability to take pre-emptive steps in the event of a service or API outage.
52
Chapter 3 Consumption
Status also includes historical data so that consumers and the Operations team can
quickly identify poorly operating products and to seek remediation efforts on the internal
or backend platform. By providing this level of visibility, it is a signal to a third party that
you are serious about the stability and reliability of your platform, and you are taking
measures to provide immediate alerting/notification in the event of an issue.
Once an API is in production, any updates for new functionality, or to patch or fix
issues, must be clearly documented in release notes. This should become part of the
deployment cycle as third parties must be kept informed of any changes to an API.
Collaborate
Be sure to encourage feedback from your consumers regarding API products and, where
possible, attempt to address the feedback in subsequent releases. Some feedback, such
as prescribed regulatory interfaces are too complex to consume, may not be possible to
accommodate changes. Feedback is a gift, and if a consumer took the time to send through
feedback, it is probably significant from their perspective – always be sure to close the loop
with the user. Continuing the scenario above – the feedback regarding complex, regulated
interfaces would be to emphasize, then indicate that regulation mandates the interface
and finally provide suggestions to assist, such as sample code or labs.
Set up an area on the technical developer portal, possibly a dedicated section in
your message forum for feature requests. As third parties are consuming your APIs, they
are in the best position to determine product gaps and potential areas of improvement.
This is a fantastic input into the product lifecycle and can make a good API great. Again,
based on the scale and reach of the API, the priority or scheduling of the request is linked
to the number of votes for the request. This is one of the biggest benefits of an active
developer community – the users can help to drive the product roadmap forward.
For integration solutions within an enterprise, all service consumers are notified
of a change well in advance, and some governance processes require approval from all
consumers before the change can be made. As an API Marketplace sits on the fringe of
an organization, the delivery team may not consider the wider impact when updating
an API. That is, from a responsibility assignment RACI (Responsible, Accountable,
Consulted, Informed) matrix perspective, a third party may not be Consulted or even
Informed. A lightweight change management process should be followed to ensure that
all service consumers are at a minimum aware of any maintenance or releases to any
APIs consumed.
53
Chapter 3 Consumption
Lead
This effort should also be coordinated by the Product Owner (PO) with significant input
and direction from the Engineering team. Although the content is highly technical in
nature, it could be argued that this would be best understood and delivered by a technical
team. My counterargument is that a technical team is not suited to lead this effort as they
may be too close to the detail. The Product Owner will provide a view from a third-party
perspective. As the Product Owner is ultimately accountable for the success and uptake of
APIs, they should lead the effort for both portals, Business and Technical, as it is customer
facing. By now, it should be apparent that a Product Owner must be semi-technical.
Developer Advocacy
Even a good product, with good documentation, needs to be evangelized. I observed
and appreciated this approach from a major cloud provider while learning how to use
a new mobile application development platform. At first, I could not understand why
it was necessary at all – the documentation, code samples, and labs were amazing and
even novice developers could get up and running in a short space of time. However, as I
progressed deeper into the platform, I ran into scenarios which were not covered by any
documentation. It was at that point I understood the value of a Developer Advocate.
Although they might not know it, I got to know them by first name by watching,
re-watching, pausing, and writing code in-step with their video tutorials. I marveled
at how their solutions were far simpler and more elegant than the complex ones I
anticipated. In addition to learning more about the platform, I also learnt how to use
[Link] more efficiently. The difference between the documentation and the Advocate
was that the latter used the product to solve a real-world scenario.
Imagine pieces of Lego blocks lying on a table. Although you might be able to
assemble a basic structure on your own, you probably would stick with familiar pieces.
Watching someone else use an unfamiliar piece to achieve a specific function would
help put that piece into perspective and give you the confidence to use it in the future.
Simply put – API Marketplaces, especially in developing markets, need strong
Developer Advocacy. Video tutorials covering concepts such as delegated authorization
in a fun, easy to understand context will certainly help alleviate developer anxiety. The
access mechanism allows viewing of the material anytime and as many times as needed
to understand complex concepts. With the recent boom in online meetups, it is now
54
Chapter 3 Consumption
easier than ever to join a user group. This should be leveraged as much as possible
to get potential developers, albeit with the pre-requisite experience and willing-to-
learn mindset, up and running on the platform. The inherent benefit of user groups,
meetings – in person or online – is that it allows two-way communication between
Marketplace and developer. I consider this interaction as mutually beneficial.
Developers can get hands-on support from the Marketplace technical delivery team.
The delivery team can also view first-hand the viewpoint from a developer. Sometimes
developing in an ivory tower may result in theoretically sound, but impractical
products. Such products typically get shelved. A key mantra of API Marketplace product
development should be simple, practical, and reliable. Any member of the team should
have the confidence to easily explain how to consume the product to an external user.
For our launch event, the Product team secured funding for T-shirts and mugs.
I chuckled at the effort and initially chalked it down to a marketing maneuver. I was
extremely surprised to see how proud the delivery team was to wear the T-shirts, and it
was at that point that I realized the importance of these tokens. “Swag,” also known as
“merch,” provides a physical connection to an intangible entity. To this day, I still have
the (unused) mug on my desk as I am proud of what we have achieved. It is one of our
key objectives to have our developer community feel connected to the Marketplace and
the same sense of belonging and support.
Developer Support
An API Marketplace is unique when compared to other integration environments since
support is required during development and for operational execution. This may seem
to double the support capacity required – however, supporting developers will ultimately
result in more operational use of the platform. Developer support also differs from
operational support as the nature of queries are different.
Our most common query was around the seemingly complex delegated authority
model. To remedy this, the team worked on material that could clearly illustrate the
concept. It may surprise you that the content was a simple set of images assembled
into a slideshow. We successfully used this on several occasions – for both internal and
external developers. It helped frame the end user, the third-party provider, and our
organization. As we stepped through the flow on calls with API consumers, testers, or
solution architects, I could almost sense the “penny-drop” moment when it clicked, and
they understood exactly how it worked.
55
Chapter 3 Consumption
As our Marketplace grows and evolves, we are refining and optimizing the developer
support process. In the early phases of our release, most developer queries were dealt
with by our first-line support team. However, if first-line support was not able to assist,
the query moved to the internal team for deeper technical or product support. For some
requests, we attempted to resolve them via email. However, nine times out of ten, our
highest success rate was an online discussion with the third-party developer.
To be completely honest, this is a work-in-progress for our implementation. What
has helped incredibly is that our Product Owner has an exceptional relationship building
ability. The PO also engages the third party when the request transitions between first-
line support and backend support to be able to frame the requirement and to ease any
friction before the online discussion. Be sure to keep in mind that by the time of the
discussion, the third party is likely to be upset that the issue was not resolved, and first-
line support is exasperated as their attempts to solve the issue have not been successful.
For the online discussion, we had representation from the first-line support engineer
who had been interacting with the user – for continuity. Senior engineers and the
Product Owner also attended the session. Our intention was not to scare the external
developer. Exactly the opposite. We wanted to show that the third party was important to
us and our entire team valued the relationship.
The number one rule around these interactions is to listen. Firstly, you must listen
clearly and attentively to the triage from the first-line engineer around the issue – in
preparation for the discussion. Based on the feedback, the team should be ready with
the relevant material or information. Secondly, you must listen clearly and attentively
to the external developer. The feedback or queries during the initial part of the session
will help you to build a better platform. Once you are sure that you have a firm grasp of
the problem or situation, then offer a solution. If you need to investigate further, clearly
indicate so. Attempt to follow up a day or so after the call. This will demonstrate that the
API Marketplace is sincere about the developer’s success.
A positive side effect is a better, personal relationship with our developer
community. We have put voices and faces to client IDs and email addresses. We know
the types of applications our developers are building and how our APIs are consumed.
In almost all our interactions, developers proudly showed off their applications. For new
product releases, we have also invited third-party developers for full-day sessions to run
end-to-end integration tests. This has helped us to identify and flesh out potential issues
before extending the offering to more third-party providers. The feedback received was
used to update and change how the product worked.
56
Chapter 3 Consumption
Although these interactions are not subject to intense time pressure, like those in an
operational context, we still attempt to handle developer support requests with the same
attention and rigor as operational issues. From a priority perspective, the operational
environment comes first. Our Marketplace fields support requests via email and Slack.
The first-line support engineer will attempt to resolve configuration or simple issues. For
more complex issues, a service desk request is logged for tracking and to assign to the
relevant member of the team for investigation and resolution. If required, the issue is
escalated to the Product Owner who will schedule an online discussion with the external
team.
Finally, and as discussed earlier in this chapter, we encourage external development
teams to be as self-sufficient as possible. If there are technical issues with API
integration, HTTP trace information regarding the requests and responses and possibly
code extracts are requested. Essentially, this is a “help me help you” engagement. An
altruistic aim of the API Marketplace is that the platform empowers, fosters, and builds
our local developer community. We discuss this in more detail in the following section.
Ecosystem
I’ve been extremely fortunate to have been on an API Marketplace implementation for
several years now and have marveled how the ecosystem has evolved over time and as
the initiative has matured. We started in a little fishbowl, just a few members of a delivery
team, with the goal of delivering a Minimum Viable Product (MVP). Initially, there was
no real connection to the outside world and a few tenuous links to backend platforms.
As the platform was readied for production workloads, we moved into a larger tank,
working closely with different enterprise teams to achieve more stability and reliability.
Our respect and appreciation of the enterprise capability grew as we understood the
value it added to our implementation. It may be easy to glance over internal enterprise
teams in the context of an API Marketplace ecosystem. I now consider this one of the key
supporting elements of the platform and an essential part of our ecosystem. Without a
doubt, the tether to an established enterprise, in the form of process and governance,
may be viewed at times as a millstone slowing the pace of change. In hindsight, almost
all of these requirements have resulted in a more stable, reliable, and enterprise-class
platform.
We were incredibly lucky to have, as our first mainstream consumer, an internally
sponsored super-app. We had moved from tank to dam. Bigger body of water, far more
57
Chapter 3 Consumption
serious, but essentially a “safe-space” to verify the platform from an operational context.
As more role-players entered our ecosystem, we had to balance super-aggressive delivery
requirements and operational issues deeply rooted in backend platforms. This resulted
in possibly the greatest expansion of the Marketplace. The number of integrations to
backend platforms grew exponentially in the space of a few short months. What helped
incredibly was the impetus of the super-app since our links into more backend platforms
were able to grow as the juggernaut smashed down barriers and tore through red tape.
With each new integration, we had to build a new relationship with a backend – not only
for development, but also for operational support.
We have since moved on to open-water. Spurred on by the success of supporting the
load of a high-performing internal consumer and earning our stripes in the process, we
are now working more with external third parties. The size and scale of the third parties
range from single-developer entities to well-known FinTechs to established online
retailers. However, we treat all with the same level of respect and commitment.
What continually amazes me is the symbiotic nature of the ecosystem. The API
Marketplace will not exist without consumers and the support from enterprise services.
Yet, it is a pivotal component for external consumers to leverage the capability of the
enterprise services. A ripple effect, which we hope will one day turn into a butterfly
effect, is that the Marketplace has stimulated the local developer community. As a
leading Financial Services provider, the capability provided by our Marketplace has
enabled the building of many innovative products and services. These new shoots of
growth need to be nurtured and supported and will result in successful third parties who
will further fuel the Marketplace. The success of the Marketplace hinges on an active,
thriving ecosystem where all entities work and grow together.
Developer Engagement
An API Marketplace may use different strategies for interaction with developers. Some
platforms use a community-based approach, where access is open, and members
support each other to effectively leverage the platform. The interaction between
developers could also result in innovative products and solutions which could include
APIs from different platforms. In these engagements, the developer portal is essentially
a meeting point for like-minded developers to share ideas and collaborate. Some portals
also provide the experience and expertise of individual developers. As solutions are
58
Chapter 3 Consumption
verified and endorsed, developer rank and credibility increases. Experienced members
could act as ambassadors as they assist new developers.
Another approach is to choose partners based on key selection criteria. The
intention is to allow a smaller subset of more experienced, established, and like-minded
partners into the ecosystem. Closed-ecosystem partnerships are used for creating,
extending, and improving API offerings. Developers could benefit from financial
compensation, premium support, and coaching through a partner network, early access
to new products, and formal accreditation. Although the developer pool is smaller, this
could potentially require more management and support from the platform provider.
As developers from different organizations might not communicate directly, a
partner manager may be required for support and to forward queries to the backend
technical team for resolution. Sharing information or assisting fellow developers may
also not be possible since they could see this as a loss of competitive advantage. It should
also be noted that expected service levels in such an environment are significantly
higher. If a developer posts a query, feedback and/or resolution must be provided in a
significantly shorter timeframe than a community forum.
The nature of Developer engagement will be determined by the nature of the API
Marketplace you will build. If, for example, your APIs help to find lost pets in a local
neighborhood, a community-approach should be used. If your APIs help to find sources
of plutonium for building nuclear weapons, you might want to restrict the partners who
can access your platform.
Tooling
Developers work with a wide variety of tools to get a job done. Developer tools could
range from email clients to code editors to Integrated Developer Environments (IDEs) to
wikis. In this section, I highlight a few tools and practices which I have personally found
to be useful as part of my daily delivery. There are many amazing tools and products
available for API consumption and development. This is not intended to be a product
comparison or benchmark. If you have experience or are comfortable with another tool,
please continue to use it.
59
Chapter 3 Consumption
cURL
cURL, which stands for client URL, is a command-line tool for getting and sending files
using URL syntax. It supports several protocols including HTTP and HTTPS – which
make it ideal for working with APIs. It runs on almost any platform on any hardware and
is included in many popular operating systems.
The reasons that I use cURL are as follows:
• Simple: I also enjoy working with cURL due to its no frills and
low maintenance disposition. It focuses on its role as emissary in
transporting a message between the key participants – client and
server. The syntax to make various API calls are concise and online
tutorials or samples are readily available.
60
Chapter 3 Consumption
61
Chapter 3 Consumption
Fiddler
Fiddler is a debugging proxy server tool used to log, inspect, and alter HTTP and HTTPS
traffic between a computer and a web server or servers.
Our support team recently received a support request from a third-party developer
who had trouble consuming an API. What set this query apart from others we received
was that it included detailed HTTP trace information regarding each request and
response. This not only allowed us to follow the flow of calls to ensure the sequence was
correct, but it also helped the Support team identify exactly which parameter of which
request was incorrect. The developer was able to provide this trace information by using
Fiddler which intercepted the call and recorded the HTTP request and response.
Developer Education
As the Marketplace team uses these tools and techniques on a daily basis, it can be easy
to forget the learning curve other developers may encounter. The technical developer
portal should have one or more of the following as mandatory elements to support third
parties:
62
Chapter 3 Consumption
3. When logging support requests, the detail required for the request
and how to get it. Using an interceptor, like Fiddler, to capture the
request and response – instead of sending code extracts.
Summary
In this chapter, we discussed strategies around the business and technical Portals of your
API Marketplace. Although the spotlight is on the dazzling API product on an amazing
stage, it is important to ensure that the requirements of the developer audience are kept
in focus.
Each Marketplace implementation will have a different combination of API products,
portals, developer focus, and engagement strategy that will make it unique. Defining this
identity upfront can help the team carve out a clear path to the end state. It may also be
necessary to allow the identity of the platform to evolve or pivot over time – in response
to customer demand. The dynamic nature of an API Marketplace is indeed one of its
biggest advantages as its flexibility allows it to respond far faster than existing enterprise
systems.
In the next chapter, we consider monetization for API Marketplaces. The
Consumption model has a significant impact on how the platform is monetized as
the two are intrinsically linked. If the monetization model is high volume with low
transaction costs, more developers are needed in the pipeline. If the strategy is lower
volume, subscription-based revenue, then a smaller subset of established, loyal
organizations willing and able to pay a subscription is the objective.
63
CHAPTER 4
Monetization
I believe that Engineering is possibly the biggest enabler of the monetization or
commercial proposition of an API Marketplace. To many technically inclined
individuals, this may seem oxymoronic as the realms are at the opposite ends of the
spectrum.
Allow me to present this argument in the context of building a new passenger
airplane. If the Engineering team focuses purely on speed, performance, and technology,
it will undoubtedly be fast and technically sound. There are a number of other factors
to consider such as the number of passengers it can carry, the fuel consumed, the range
or distance the aircraft can cover, and the maintenance and lifespan. These factors
determine the financial viability of the aircraft. A real-world example of this scenario is
the retirement of the supersonic airliner, the Concorde, which is an engineering marvel
but unfortunately, not the most economical.
In much the same way, the technical delivery team has a responsibility for the
commercial trajectory and financial viability that influences the lifespan of an API
Marketplace. In all honesty, I would classify this very much as a privilege and challenges
the Engineering team to maintain a view on commercial objectives when designing
and building solutions. Based on observation of a number of IT projects, leaving this
objective to the project executive to shoulder alone will ultimately result in a technically
sound but imbalanced solution. Such projects are generally shelved closer to release or
mothballed due to unsustainability.
An approach which has worked remarkably well for our implementation is one
which affords any member of the team the opportunity to question or make a suggestion
regarding commercial aspects of an API product. This has been enabled by a project
executive who not only welcomes feedback but often demands it from the team as
a signal of their ownership in the platform. Whimsical pitches regarding potentially
amazing revenue-generating products from the technical dugout are often fielded
with incredible finesse to avoid bruised egos as these may lie outside the rules of the
organizational game.
65
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 4 Monetization
66
Chapter 4 Monetization
Our strategy is to start the wheel by earning trust and establishing developer affinity
to the platform. From observation of third-party consumers, our APIs provide significant
support and acceleration to the development of the product or service which will be
delivered to the end user. In many cases, these users come from a market segment that
the greater organization may have not been targeting. Although the primary consumers
of the Marketplace are essentially the third-party providers, increased activity from
the end user brings more API usage which enables the development of improved,
competitive commercial models which in turn results in additional consumption of the
APIs and attracted new consumers to the platform.
By leveraging economies of scale to service and support new customers with existing
infrastructure and operational capability, the platform generates more revenue without
incurring additional costs yielding higher margins. We have adopted a similar strategy
to Amazon and have made a conscious decision to pass this benefit on to our customers
by lowering costs. As Jeff Bezos wisely predicted, lowering costs results in increased
traffic which invariably speeds up the momentum of the flywheel. An observation is that
lower costs also reduce the barrier to entry and the platform has caught the attention of
smaller consultancies who are building innovative solutions with our products.
67
Chapter 4 Monetization
In much the same way that a quick dash into a supermarket for one or two items
invariably results in a trolley full of additional purchases, third parties who start with
one API product typically leverage the onboarding process and technical integration
knowledge to assimilate and consume others. Our Marketplace started with a few API
products but, over time, the selection has steadily grown through existing consumer
demand and new product definitions. Although we cannot claim to have the largest
number of API products, those in our stable provide real business and customer value.
Minimal This is the type of store that only provides bare necessities. No fancy items – only
what is absolutely necessary to keep stock moving and to keep the lights on
This is the type of API Marketplace that is built simply to be compliant to
regulations. The regulator has issued legislation to be adhered to by a specific
deadline, and this is the bare minimum that needs to be done to avoid penalties.
No strategic objective for the moment – possibly a wait and see approach
Niche player One of the stores I would have loved to visit is RadioShack. This was a dream
destination if you needed anything electronics related. It pitches only to a specific
market, but is a one-stop shop for anything in that category
A comparable API Marketplace is one which only deals with a specific category of
APIs. For example, a Bank might only provide APIs which deal with money – from
Payments to Loans to Transaction data
(continued)
68
Chapter 4 Monetization
Goal Description
Supermarket Supermarkets are the lifeblood of communities across the world. You can dash in
for bare necessities like milk or to find less commonly used items like light bulbs.
They cater to a wide range of customer requirements, but product selection
is based on popular product demand. So, you might be able to find the most
common type of light bulb but not the one which fits an antique chandelier from
the early 1900s
This type of Marketplace is an Aggregator. It brings together commonly used APIs
and allows easy consumption under a single umbrella. A single point of contact
mitigates the need to maintain accounts or relationships with several providers.
The inherent benefit is that with economies of scale, it will require fewer staff to
support. In addition, the combined might of a larger entity representing several
consumers can result in more competitive pricing and service from backend
providers. The supermarket, possibly part of a chain, is likely to get far better
pricing and service from a supplier than an individual would
Champs-Élysées A famous shopping avenue in Paris is the Champs-Élysées. It features well-
established stores and is a popular destination for both locals and tourists.
Square footage is at a premium, and only specific brands are invited to participate
to maintain the exclusivity of the space. Although each store is independent, it is
intrinsically connected by the aura and atmosphere of the location
This type of Marketplace is an ecosystem – there is no single owner, but is built
around a central theme or construct. There is a one-to-one relationship between
consumer and provider. Trust and confidence in the provider’s ability to execute
is gauged implicitly by its presence in that forum. That is, if a service provider
has been admitted to that exclusive group, it had to meet specific quality criteria.
Conversely, providers need to maintain a high standard of quality to retain
membership to this group. This mutual trust is gained over time
(continued)
69
Chapter 4 Monetization
Goal Description
Shopping mall Shopping malls are popular attractions for many customers. There is a wide
assortment of stores, and the minimum requirements for potential tenants are far
less stringent. More importantly, there are utilities such as security, parking, and
bathrooms which are provided as a convenience to the customer and are provided
on behalf of all tenants. Many of these centers have anchor tenants which are the
main attraction for customers
This Marketplace represents a closed ecosystem. Consumers are in direct
contact with providers but leverage shared capabilities – typically security and
support. Common infrastructure may also host multi-tenant solutions to reduce
costs and achieve economies of scale. Anchor tenants in this instance may be a
well-established and trusted brand, such as a regarded Financial Institution, who
also participates in this environment. This could represent a natural evolution
for organizations who start their individual Marketplaces and want to stimulate
growth by attracting more third-party developers and supporting smaller
providers to reach a larger audience
70
Chapter 4 Monetization
Developer Pays
Let us start with the option that will keep the Capitalists happy. After all, the financial
viability of an API Marketplace will be a hot topic when the concept is pitched for
funding. For this approach, the third-party provider would pay for use of the API
products. From examination of successful platforms such as Twilio, there are a number
of different ways in which this may be achieved:
71
Chapter 4 Monetization
–– Points based: One of the most successful medical aid schemes in our
country is based around the concept of “points.” The idea is incred-
ibly simple, but profound in its operation and reach. A member
receives points for a healthy lifestyle – more exercise and fitness
results in more points. As points increase, the users’ status rises. The
member can then purchase items such as airline and movie tickets at
discounted prices. The benefit to the scheme provider is that healthy
members are less likely to get sick and claim. This particular program
has many members, now fanatical about fitness, and has become so
successful that the organization has now moved into banking – the
incentive is that points can be earned through spend. This is an
example of an all-round win. Both consumer and provider win, and a
host of external service providers participating in this program also
benefit. A simple implementation of this pattern in an API
Marketplace is that consumers earn credit for a specific number of
transactions. The credit can be used to offset costs or possibly to
72
Chapter 4 Monetization
Before we move on, there are two critical factors which must be taken into
consideration. The first is that the billing capability of the platform, for any of the above
approaches, must be bulletproof, transparent, and without a single element of doubt
or uncertainty. Drawing on the similarities of mobile billing, customer queries are
immediately resolved using an itemized bill. Your billing platform must be capable of
generating an itemized bill which clearly shows when the transaction took place, which
API was called with the ability to drill deeper and provide additional information such as
transaction origination, request, and response payload.
The second and possibly the most important factor to keep in mind is that the
API product must generate value and revenue for the third party first which will drive
revenue for your organization. It is quite possible to build and launch an API product
and attach a high price tag to it providing bragging rights of high potential-value
products. However, without a compelling value proposition, there will be little third-
party adoption and usage, and it will stay on the shelf yielding little revenue.
73
Chapter 4 Monetization
74
Chapter 4 Monetization
Free
The key difference between Free and Freemium is that Free API products will always
be provided at no charge. Value creation in this instance is implicit – it drives API
adoption and increases the number of third-party providers using your platform – whom
could be potentially converted over time. A goal is that the zero cost will result in mass
proliferation which will help get your brand to more potential customers.
This represents an appealing option for third parties, and as much as it may be
provided grudgingly by the host organization, the potential impact and value to the third
party could be significant. For example, a simple data API to provide lists of income
and occupation types may be taken for granted in an enterprise but may be of great
value for a startup that needs the data for their registration process. It also affords your
organization the opportunity to be accessible via new channels – which are essentially
apps and services built by third parties.
75
Chapter 4 Monetization
Indirect
In the spirit of partnership and to cement the foundational principle of a win-win model,
this strategy is centered on the benefit to the end customer. A successful sales strategy
is one where all participants gain value from the transaction. Value, using an Indirect
strategy, can be created in the following ways:
Billing Engineering
Having defined a number of strategies for billing in an API Marketplace, let us now
discuss the technical engineering for practical implementation. The API product will
typically define the monetization approach – some may be paid for by the third party;
76
Chapter 4 Monetization
others may have a revenue share or referral or free. This is typically defined by the
Product Owner in close consultation with the backend supporting systems.
It is also important to identify how consumers will be billed – will the third party
need to fund an account which is charged on each transaction, or will transactions be
billed and invoiced later? Regardless of which mechanism is selected, it is important to
build a “billing backbone” which will service all APIs in the platform. All events, even for
free APIs, should be sent into the billing pipeline for Analytics and Reporting purposes,
and this billing function should not be taken lightly. Whenever possible, leverage an
enterprise capability. If this is not possible, consider using a hosted or managed service
as this has a high operational impact.
A technical flow of an Event Billing Model is illustrated in Figure 4-2.
77
Chapter 4 Monetization
A An event is generated from an element in the Application Stack, typically upon completion
of an API request and, at this time, primarily from the Microservice component. The
event contains details of the call including the product, third-party identifier, completion
status, request and response payloads, and date and time. The event is inserted into a
database – to minimize call latency and to allow offline processing
B The event record is read by a Billing Pre-Processor on a batch schedule or trigger. The
batch schedule allows more efficient processing as many records are processed for a
specific period. Trigger execution allows near real-time processing of events
C The record is supplemented with additional metadata from systems such as Master Data
Management (MDM), the Enterprise Product Catalog, which contains an API to product
mapping, and Third-Party Provider database – which contains additional configuration
regarding the third party such as account to be billed. As this is achieved asynchronously,
there is no time pressure for data collection
D The enriched and mediated record, in a pre-defined format, is routed to a Pricing and
Billing Engine, which is provided as an Enterprise Service. This capability will process the
billing event and update the third party’s account data. Note that rules regarding how the
event should be billed are included in the record. This approach allows the Billing Pre-
Processor to influence how the event is billed
E The mediated record is also stored in a datastore accessible to business support
applications in the Marketplace
F Custom reports, using enriched, mediated records, are run periodically to provide a near
real-time billing view of the platform. Note that these views may not be accurate revenue
data – but supports the “notional view” discussed later in this chapter
78
Chapter 4 Monetization
The steps in a near real-time Billing Model are described in Table 4-3.
A A call to reserve funds is made before the API request is processed. This ensures that the
third party has sufficient credit available to service the request. At the time of the call, the
exact amount to be billed may not be known – a pre-defined budgetary amount based
on the nature of the API product is reserved. If the minimum amount to meet the funds
reservation request cannot be met, an error is returned to the consumer
B An event is generated from an element in the Application Stack, typically upon completion
of an API request and, at this time, primarily from the Microservice component. The event
contains details of the call including the product, third-party identifier, completion status,
request and response payloads, and date and time. The event is inserted into a database –
to minimize call latency and to allow offline processing
C The insertion of the event record triggers a call to the Billing Engine. The Billing Engine
orchestrates calls across the components detailed below
D It is first necessary to rate the event. The event record is routed to the Rating Engine
(continued)
79
Chapter 4 Monetization
E The Rating Engine caches configuration data from systems such as Master Data
Management (MDM), the Enterprise Product Catalog, which contains an API to product
mapping, and Third-Party Provider database – which contains additional configuration
regarding the third party such as billing account in in-memory datastores for optimal
processing. Note that for this type of bill processing, latency is a key consideration. Low
latency allows faster processing of the event which results in a smaller risk window period
between balance update and additional requests
F The rated event is then used by the Charging element to deduct a specific amount from
the third parties’ remaining credit. The rated event could also indicate that the third party
should not be charged – for example, if the API request was not successfully processed or
if the product was part of a promotional campaign. In this instance, the reserved amount is
released
80
Chapter 4 Monetization
platform or harvests data from disparate sources to allow data to flow in. If the Product
Owner has a well-defined view of what is needed, this top-down approach will guide
the Engineering team. The alternative is a bottom-up, technically driven view of some
random system metrics that makes for a pretty widget on the control panel but provides
a useless business indicator.
D
ata Collection
At full flight, there is an almost continuous stream of events within the ecosystem of an
API Marketplace. Apart from the obvious API calls, potential consumers may be raising
support tickets from prototyping efforts, requests to backend systems may be slowing
down, end users could be in the final stages of completing a high-value transaction, or
unanticipated loads could be originating from a last-minute campaign. A key objective is
to capture as much of this data as possible – efficiently, consistently, and reliably.
From years of experience in various integration domains, and taking inspiration from
a medical triage process, we have implemented a Sensor and Probe strategy, illustrated
in Figure 4-4. For elements we have direct control over, such as the Application Stack,
explicit sensors have been attached to key process flows. These publish well-defined
events providing granular information regarding the request – such as the third-
party identifier and transaction value. When the event is received, it still needs to be
supplemented with additional metadata – such as resolution of the name of the third
party, given the identifier.
81
Chapter 4 Monetization
There are many instances where the data is captured in external systems. For
these, we use a probing strategy. The Service Desk, which is used to capture customer
interactions, contains a wealth of information and is an example of such an entity.
Requests from potential third parties for access to API products or additional
information is valuable Lead data. Support requests regarding service outages or
transaction tracing are equivalently vital as they represent interactions which may
provide Retention value. As the data is stored in an enterprise hosted application, a
probing mechanism, in the form of a custom application, has been built by the technical
team to query and extract the interactions. This approach has also been used to parse
and extract application and audit data to expedite access in some instances where
additional information was urgently required.
It is important to survey the landscape to identify the various participants and
sources of information and define a strategy regarding how the data may be harvested.
D
ata Analysis
Early in my career, when tasked with providing Analytics for an integration platform my
team supported, I pursued this task with a technical orientation. I was obsessed with
gauging low-level metrics, such as requests per flow, and instrumented the platform
and application to leave a trail of data that was ingested into a database. Unfortunately,
my elation and pride in watching the data stream in was soon replaced by despair as
I attempted to structure queries to interpret the data to determine any meaningful
pattern. From this experience, my basic understanding is that context is key to
analytical information, and a single analytical data point is generally made up by several
underlying metrics, as shown in Figures 4-5-1 and 4-5-2.
82
Chapter 4 Monetization
83
Chapter 4 Monetization
This is exactly the Analytics view requested by the Project Executive. Note that for
each indicator, there are several dimensions. Let us examine some indicators across
various dimensions to establish how it could be used:
84
Chapter 4 Monetization
platform has not established deep roots within any third party. These hypotheses and
conjectures are made possible by having key data available across various dimensions
over different periods of time.
R
eporting
With maturity of the platform, more high-value API products and the requirement of
providing mission-critical support to key third parties, our team has implemented the
following mechanisms to provide visibility into platform activity:
Bi-hourly instant messages from the Operational Support team detailing system
stability and successfully completed transactions for key API products. Again, if the
numbers are uncharacteristically low, questions are raised regarding the availability of
supporting systems and downstream providers.
85
Chapter 4 Monetization
Total visitor count Number of unique users accessing the application (portal or API)
Leads created Users who completed the basic information step/form requesting further
information. Those that did not proceed further may be contacted
telephonically by sales agents
ID statistics Number of identity document uploaded, successfully processed, and
failures due to OCR. Failed requests are interrogated to determine if there
was a problem with the uploaded image or a system failure
Transaction statistics Number of detailed transactions and associated states calculated,
declined, failed, and accepted – based on process execution logic
The key to a successful reporting strategy is to provide specific, pertinent data, which
can be pulled (via web) or pushed (via email or instant message) in a format which can
be quickly understood and interrogated by the target audience.
86
Chapter 4 Monetization
87
Chapter 4 Monetization
88
Chapter 4 Monetization
Summary
At the start of this chapter, I put forward the argument that the engineering capability
underpins the commercial success of the API Marketplace. We also discussed the
flywheel process which, once initiated, creates a ripple effect throughout various areas
of the platform. By focusing on the Developer Experience, it attracts more Customers
which brings down Costs and allows aggressive and new Commercial Models which
fund new Product Development which more Third Parties consume which comes full
circle to a better Developer Experience. This wave of perpetual motion powers the
Growth strategy of the API Marketplace.
We touched on the need of establishing an identity for your API Marketplace and
contrasted this to setting up a brick-and-mortar store. By providing the comparison, I
hope that you have started to formulate the type of store you would like to build and the
new platforms which will soon set up shop. We then discussed the ways value can be
created from an API Marketplace, and we observed how it could be achieved implicitly,
explicitly, and even indirectly. Dropping down to the nuts and bolts, we reviewed
engineering approaches to support various billing strategies. It is important to note that
the billing strategy comes first, and the platform is engineered to support it. We then
moved to a key area of Monetization – which is visibility and measurement. Analytics
and Insights provides much needed visibility which powers the control panel that is used
to pilot the Marketplace. We reviewed data collection, analysis, and reporting strategies.
The Notional Income Statement is the mechanism we used for measurement and to
determine profitability of the Marketplace. Finally, we demonstrated a way to pivot to
create new business models.
Running an API Marketplace is an extremely challenging but rewarding activity. The
team has adopted a startup mindset, which makes us more efficient, thrifty, leaner, and
constantly on the lookout for new opportunities. This is yet another flywheel process
which drives a perpetual engineering optimization process. This has resulted in a
constantly evolving Platform Architecture which we discuss in more detail in the next
chapter.
89
CHAPTER 5
Platform Architecture
Our Marketplace was born into a post Netflix-era world, one of the first projects in a
newly established Digital practice. The team was not only tasked with the delivery of
an Open Banking prototype but presented with the opportunity and mandate to use
bleeding-edge technology. In hindsight, this has been both a blessing and a curse. The
ability to use new approaches such as containerization afforded our platform a high
degree of flexibility. The unfortunate drawback was that we were 2 to 3 years ahead of the
rest of the organization and the new approaches we wanted to use were not yet trusted,
let alone understood.
The inherent benefit of time is that it allowed our team to evolve and optimize the
platform and establish trust with the rest of the organization through knowledge sharing
and iterative delivery. The waves of Change soon reached our organizations’ shores, and
concepts and approaches that we were trialing were becoming more widespread and
trusted by similar institutions. It has also allowed us to position the Marketplace as an
enterprise-grade platform, pivotal to the function of the organization as opposed to a
satellite installation fulfilling a niche role.
Through this process, we have a greater appreciation of supporting systems within
the enterprise. We have also been humbled by the effort of operationalizing bleeding-
edge technology and are now acutely aware of how people and process are essential
ingredients of the final solution.
In the following sections, I provide a time-lapsed view of the elements of our
platform, how it has changed, and my thoughts and plans regarding its evolution. This
is done with the hope to bootstrap your implementation and to share some of the ideals
and principles we have since established in ours.
91
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 5 Platform Architecture
Elements
Like the elements in the periodic table, Figure 5-1 details the components of our Platform
Architecture. Some, like the Reverse Proxy, are provided as an atomic shared enterprise
service. Others, like our Microservices, have been genetically engineered, which gives
our Platform its unique identity. These blocks represent the core of our Marketplace, and
we are continually trying to optimize their function in order to make the platform more
efficient. Each of the elements is discussed in further detail in the following sections.
92
Chapter 5 Platform Architecture
API Management, and Monitoring. A key standard for our organization is that all
APIs, internal and external facing, should be accessed via an API Gateway. A great
feature of API Gateways is the ability to throttle user requests. Although this can be
custom developed, the benefit of using an off-the-shelf product is that it alleviates the
operational workload from the team. Tasks such as security configuration, certificate
management, API product updates, and versioning are provided out of the box.
Several Cloud providers offer a Platform-as-a-Service (PaaS) API Gateway, which can
be easily provisioned. The benefit of a PaaS offering is that the scaling and management
of underlying infrastructure is handled by the Cloud Provider. As an established
Financial Institution, we have a commercial off-the-shelf product, which is managed by
an internal team and supported by the software vendor. To allow the Delivery team some
autonomy, a separate Developer Organization within the Gateway was created for our
API Products. This is essentially a logical separation of the API Gateway infrastructure.
We are allowed administrative access in the Development environment but must adhere
to strict governance as we progress to Production.
Identity
This block hosts many capabilities which is critical to the function of the API
Marketplace. One of the most important is the Access Control Authentication Policy,
which, in layman’s terms, is the foundation for authenticating end users. As it hosts the
Directory Server which contains user profile information against which credentials are
verified, a fundamental design decision made at the outset of the implementation was
that we would leverage the enterprise Authentication capability and build a custom
Authorization framework within the Marketplace. The Reverse Proxy capability also
resides under the same umbrella and acts as an emissary between end user requests and
server-side portal applications. Leveraging the enterprise security infrastructure, by way
of physical infrastructure, processes, and services, has bootstrapped our implementation
significantly. There has been some customization to allow for Marketplace-specific
requirements, such as junctions which allow unauthenticated access to backend
web applications and rolling refresh token windows. This decision has also helped us
navigate Architecture and Design approval boards. There was a sense of comfort from
long-serving Architects that this bleeding-edge API Marketplace, which could be a new
channel of attack, was secured using trusted enterprise security standards.
93
Chapter 5 Platform Architecture
I have been fortunate to have experience with all the approaches in Figure 5-2. On
one of my first projects, we were allocated a Windows server which ran on a physical
machine in a datacenter managed by the organization. I can still recall eagerly taking a
snapshot of the number of CPUs and memory and sending it to my university friends
as bragging rights of the hardware allocated to my new project. Even when I had to
drive through to the datacenter on the night of a production deployment to physically
restart the server, I felt like one of the “Right Stuff” astronauts walking down the gangway
on their next space mission. As the figure shows, all applications run directly on the
Operating System, and if one of them threw a tantrum that caused high CPU or memory
utilization, the others suffered.
A few years later, while on a project for a new middleware platform, we were
allocated Sun Sparc servers, each with many CPUs with multithreading capability and
a whopping 512GB of RAM. The server architecture whitepaper had a prized spot on
my bedside table as NASA and JPL were probably using the same hardware to launch
space shuttles. The beauty of using Sun Solaris was that the Hypervisor was baked into
the operating system, and we could carve up the machine into several logical Solaris
94
Chapter 5 Platform Architecture
Zones (Virtual Machines), each with its own operating system and allocated a specific
number of resources in the form of threads and memory. If an application misbehaved,
the Solaris management software would contain it and prevent it from impacting other
zones. I found myself jockeying a spreadsheet containing the details of Solaris Zones
which was used for various environments and components of the stack.
I prided myself with the detail of the spreadsheet, and to the annoyance of the rest
of the team, referenced each zone by IP, like some old friend whom no one else knew.
As I was responsible for the Platform build, I scripted as much of the installation as
possible – but eventually had to resort to running custom commands on different zones,
sometimes to resolve cluster issues, sometimes to resolve missing dependencies. Again,
I chalked up these interventions as my part in a Herculean effort to keeping the platform
up and running. Little did I realize back then that I was also responsible for creating a
“snowflake environment.” Each zone in the environment was different from the rest.
I now take solace that even if my provisioning script did create identical clones, each of
the zones would have invariably moved out of sync due to operational changes made on
some, but not others.
Virtual Machines (VM) are a move in the right evolutionary direction – they allow
better use of the underlying infrastructure. The drawback is that the VMs are heavy on
resources, VM configurations could invariably move out of sync, and they also encourage
vertical scaling of infrastructure which is not tenable over time. That is, the physical
host machine can only scale to a maximum level which limits the number of VMs it can
support.
For our Marketplace implementation, an early decision before I joined was to use
a Container approach. My first experience with containers was Docker, and as I ran
through a tutorial shown in Listing 5-1, I was blown away with the simplicity of the
concept and sincerely wondered which rock I lived under when the technology launched
in 2014.
FROM node:14
95
Chapter 5 Platform Architecture
EXPOSE 8080
CMD [ "node", "[Link]" ]
Like the Hypervisor is the enabling element for Virtual Machines, the Container
runtime enables Containers. There are many great resources which provide details
regarding how this is achieved by Hypervisors and Container runtimes. My personal
definition is that a container is a specific definition of a software configuration, which is
referred to as an image. As shown in Listing 5-1, the definition specifies a base software
element, to which you add custom deployments and commands to be executed. All
instances which are created from that image will be the same. Instead of working from
the OS level, it allows you to focus on the Application level and associated dependencies.
Consider the difference between a Virtual Machine and Container in the context
of baking cakes. For the Virtualized approach, the chef is provided with a full kitchen –
different cooking utensils, all appliances, and a full pantry to choose from. Invariably,
the chef will only use a subset of utensils, appliances, and supplies. For the Container
approach, the chef is provided with only what they need to deliver a cake – specific
utensils, ingredients, and possibly only an oven. The Container approach also forces
deployment teams to make changes at a code/configuration level. If a library or package
needs to be included, the container image configuration must be updated. Container
instances are purposely transient. Images are also lightweight, and as they do not need a
full OS to run, they require a fraction of the underlying infrastructure. The result is that it
is possible to run more containers on infrastructure as compared to Virtual Machines.
A further benefit is that this allows horizontal scaling of infrastructure. Cheaper,
albeit less powerful hardware, can easily host several container instances due to their
lightweight footprint.
A Managed container platform, like Kubernetes, provides capability like self-
healing which restarts failed containers and checks health of containers before
advertising them to clients. It also provides automated rollouts and rollbacks. To be
completely transparent, our early project team was in unchartered territory regarding
containerization – let alone having to build a Kubernetes Managed Container platform
on-premises. I can still see the hopeless expression of an exasperated project manager,
eager to meet the sprint objective – when the resident DevOps engineer gave feedback
96
Chapter 5 Platform Architecture
of “we don’t know what we don’t know” for the resolution on an issue during the
Container Platform build. Our frustration with internal organization governance and
security restrictions grew exponentially as we experimented with Cloud PaaS services,
which could be provisioned in minutes, but could not access internal systems. The first
iteration of our Platform was a single pod on a single node – which had to be restarted
periodically. A small victory – but for our project team, that was a small step for man, but
a giant leap for DevOps!
We have since had two major iterations of the Managed Container Platform, and
through our progression, now have a far better understanding and appreciation of what
Kubernetes offers. It is easy to become enamored with the appeal of Containerization,
especially a platform like Kubernetes. I have observed the power of Infrastructure as
Code and have suffered delusions of grandeur by the possibility of creating “Genesis
scripts” which can terraform entire environments in minutes. What jarred me out of my
reverie was that, in the context of an API Marketplace, the Managed Container Platform
is an enabler of the application platform. I have since come to the conclusion that the
true power of a Managed Container platform, like Kubernetes, is that it fades to the
background and allows you to focus on the application. As a full-stack engineer, it is
essential to understand the elements and function of a container platform and how a
request journeys from ingress to service to pod. The management of our on-premises
Kubernetes platform has since been transferred to an enterprise DevOps team. This will
further transition to a managed Cloud service. Kubernetes as a Service offerings abstract
complexities of infrastructure management, network fabric configuration, and help
teams to easily achieve complex objectives such as setting up persistent volumes.
Microservices
I may be heavily biased – but I consider our microservices layer to be the magic
ingredient of our Platform. To be fair, microservices are underpinned by Containers.
My view is that the Container is a Best Supporting Actor, while a microservice is the
Best Actor. I did not always feel this way. Having spent most of my career in established
integration environments, components such as an Enterprise Service Bus (ESB),
Application and Process servers, all deployed across complex cluster configurations,
were deeply ingrained when I joined the project. My opinion at that time was that
integration built without these elements was simply not of an enterprise-grade – possibly
as I previously worked at a software OEM. If we cut out the microservice layer, it would
97
Chapter 5 Platform Architecture
98
Chapter 5 Platform Architecture
supports the concept. Any programming language, strongly typed or not, can be
adopted. It is not so much a question of what you use but more of how you use it.
As we built our API Marketplace within an established enterprise, we often found
ourselves between the pressure plates of a well governed API Gateway and a risk-
adverse, “if-its-not-broke, don’t-fix-it” IT capability. Microservices are our shock-
absorbing mechanism which buffers the impact and allows us to deliver on extremely
aggressive project timelines.
We dive deeper into the microservice architecture later in this chapter.
Database
A database is an essential element of any platform, as it is used to persist transactions,
more so for ours as it enabled a stateless microservice architecture. Our initial approach
was to run the database on the Container platform. This featured prominently on the
initial design submitted to an internal Solution Alignment Forum. Unfortunately, our
DevOps druid skills were not strong enough to conquer persistent storage volumes
on our Kubernetes cluster, and we instead adopted a new design strategy that our
Kubernetes cluster would not have any persistent storage. I hope that this position
inspires a reader out there to write a book on the “Dummy’s Guide to Persistent Storage
on Kubernetes” and I promise to buy a copy.
However, this decision was made after intense discussion and deliberation. The
deciding factor that helped to settle the matter was that database management would
never be a core function of our team. We could easily build a database container,
but making it highly available and fault tolerant would make our container cluster
configuration much more complex. Our Platform now uses an Enterprise provided
service, and from observing the various areas of database management, I have no doubt
that we made the right decision. To clarify, our team owns the data. The Enterprise
service team owns the database.
Integration Strategy
As the following figures reflect, our microservice integration strategy has evolved over
time. I find it remarkable that, at the outset of a specific phase, an idea or approach
seems so fantastic that you cannot wait to roll it out to every component in the stack. As
the sun sets on this approach, the reverse ideology kicks in as the team piles up technical
99
Chapter 5 Platform Architecture
debt items to move to the next approach. I consider the evolution of ape to man in the
same light as I survey our integration methodologies over the years. In our defense, the
benefit of hindsight affords this lofty perspective. This also offers some solace as our
current integration strategy is likely to evolve as we discover a more optimal solution.
Figure 5-3 shows the integration approach used for our first generation of
microservices, which underpinned our MVP. The team took a purist view of a
microservice, and the principles of encapsulation and isolation were so enshrined
that each component was assigned to a different developer. The result was that each
developer built and embedded their own integration logic into the microservice they
were assigned. From a post-mortem perspective, this is definitely a face-palm moment.
In the heat of a MVP, with a geographically distributed development team and each
developer working hard to stay off the bottom of the food chain to meet their sprint
objective, this is a very probable scenario. It came to light much later that the platform
one developer integrated into to retrieve a list of accounts was the same another
developer invoked to retrieve mapping reference data.
The one benefit was that the team met the MVP objective. Unfortunately, that is
where the benefits stop. Code duplication, varying integration approaches, larger and
heavier deployments is enough reason to make any good integration team hang their
head in shame.
Figure 5-4 shows the next stop on our evolutionary journey. Back then our
codebase was not as large as it is today and in a moment of inspiration, I consolidated
all integration logic into a shared library. I was especially pleased with my efforts as
the shared library would allow in-process communication between microservice and
backend integration logic. Not only would this solution be super performant, but it
would also eliminate the horror of code duplication. I was so enamored with the shared
100
Chapter 5 Platform Architecture
library concept, I dubbed it a “framework.” The home for this prized asset was a git
submodule, which every microservice referenced.
101
Chapter 5 Platform Architecture
As a developer, I am of the firm, possibly dated, belief that if a code element is written
more than once, it must be re-written as a single element to serve multiple consumers,
albeit with a different interface. A duplicated framework, with copies embedded in each
microservice is akin to a catastrophic, world-ending event by my classification. Just as an
alien race on a planet fast running out of resources to sustain its inhabitants would send
out exploratory probes for a new home, our Research and Development team sought out
new integration approaches as the framework fragmentation threatened to slow down
our delivery and return our platform to the dark ages of custom integration logic per
microservice.
Figure 5-5 illustrates the solution which now underpins our platform integration
strategy and ensures our evolutionary survival. The basic premise is that the integration
component is extracted, externalized, and only accessible via a well-defined interface.
This has led to the creation of a new category of microservice in our platform, which
we have labelled as “middleware components.” The various taxonomies of microservices
in our platform are discussed later in this chapter.
The inherent benefit is that this reduces code duplication and results in a leaner,
more streamlined microservice deployment. That is, instead of packaging a version of
the framework inside the microservice, the framework functionality is externalized and
accessed via an interface. Unfortunately, this opens the door to a potential performance
drawback of out-of-process execution. The solution we use to minimize this impact is
Google RPC (gRPC), which is discussed in more detail in the following section.
102
Chapter 5 Platform Architecture
103
Chapter 5 Platform Architecture
104
Chapter 5 Platform Architecture
having a conversation with someone on a remote planet. You say something, wait some
time until the message is received and has been replied to before you continue. As an
impatient developer, I demand the ability to make and observe changes immediately.
This can only be achieved using a local development environment.
My first pass at establishing this was to start up each microservice locally, in a
separate terminal, each on a different port. It took a fair amount of time per development
session to set this up, but the upfront time investment saved hours as I would not have
to wait for the CI pipeline. I was fairly proud of this setup and patted myself on the back
with each terminal tab opened and microservice started.
A pro tip from a fellow developer jolted me to the harsh reality that I was working
harder, not smarter. The solution was to use the port-forward capability of the
Kubernetes command-line tool, kubectl, to start a local listener which would route the
request to a gRPC pod running in a Kubernetes cluster. This concept is illustrated in
Figure 5-6.
This allows the developer to build a solution using a blend of local and remote
components based on the following strategy:
Taxonomy
Not all microservices are created equal, and, over time, we have created different
categories of components. From previous roles as a Technical Architect, I prided myself on
creating well defined, layered architectures. Each component fit into a specific layer and,
like a military chain of command, a strict protocol was enforced – a component was only
allowed to receive requests from the immediate layer above and could only relay requests
to the layer below. Although the Architecture diagrams were great, they did not translate
well from a development and execution perspective. Integrating into a new backend,
adding or updating business logic required changes to various layers which slowed
down delivery and increased operational overhead. Adding in new elements into the
architecture also caused significant angst and architectural conjecture when solutioning.
Based on the battle scars of trying to compartmentalize components into layers,
we have deliberately adopted a fairly “loose” architectural pattern. Like our team
organogram, we have a flat structure and do not have a hard and fast rule that only
certain types of components can interact with another. The relationship between
components, as illustrated in Figure 5-7, has evolved organically. The key focus is on
functionality and one of the core principles is reusability.
107
Chapter 5 Platform Architecture
As much as I would like to claim that this structure was our aim from the outset, it
has evolved organically. In all honesty, there has been many developer man-days lost
as elements have been written and re-written. With the base structure now established,
new elements introduced into our ecosystem are quickly categorized and harvested. We
have a fairly flexible architectural vision underpinned by key principles which ultimately
result in a relatively uniform deployment.
108
Chapter 5 Platform Architecture
P
latform As a Service
The Platform as a Service (PaaS) concept shown in Figure 5-8 resonates across our
Platform deployment, and I would like to spend a little time to elaborate.
109
Chapter 5 Platform Architecture
of these elements is the realization that they were going to a better home, one where they
would receive the necessary attention and support. One better equipped to handle their
needs with experienced subject-matter engineers and a well-planned future.
Platform Services
Developers are snowflakes. As a developer myself, I say this with the greatest of respect.
Each developer is unique, and the odds are that if we were to ask three developers to
build a logging solution, we are quite likely to get four different solutions – there’s always
that over-achiever who wants to impress by submitting more than one option. From a
creativity perspective, this is fantastic. From a support perspective, this is a nightmare as
uniformity and structure in an operational environment is a mainstay. Platform services
are an essential mechanism to bridge development and operational worlds by providing
shared libraries or packages to achieve the following:
110
Chapter 5 Platform Architecture
111
Chapter 5 Platform Architecture
Deployment Architecture
We tried an assortment of combinations of the above elements to determine the most
optimal configuration. This is possibly one of the most rewarding elements of our
deployment architecture as the Lego brick approach allows us the flexibility to assemble
the stack in various formations. Since inception, we have been tethered to on-premises
infrastructure and systems. In the sections below, I detail a roadmap and a key objective
to move to Cloud infrastructure and managed services. Each iteration adds support for
the next and we have tested and pushed the organizations boundaries a little further on
each deployment. It should be noted that high levels of tolerance and patience from our
Enterprise Information and Network Security teams were key to our success.
Launch Configuration
Figure 5-9 illustrates the Launch Deployment Configuration which underpinned our
MVP. Like kids let loose in a candy store, we threw caution to the wind and used as many
technology elements as possible and routed requests through as many hops as needed
to get to the destination. If an enterprise policy did not allow firewall access for a specific
system, we adopted a rebound approach until we found an alternative. While this will
certainly work with a tenacious team, the end result is not as optimal as it could be.
112
Chapter 5 Platform Architecture
113
Chapter 5 Platform Architecture
A factor which accelerated our delivery, and which still does today, was permission
for direct, albeit via a load balancer, access to our microservices from the API Gateway
instance in the DMZ. The enterprise standard is that all internal APIs are to be accessed
via the internal Gateway. This would have resulted in definitions published twice,
internal and external. It would also have a performance impact as the request would
have to traverse another stop. The multi-node Managed Container platform hosted
a single Authorization portal container application in the DMZ. Justification for this
elaborate deployment was that it would help withstand the high traffic when the
platform launched. I still chuckle when I think back to our initial outlook and the design
decisions made based on emotion rather than reality.
As-Is Configuration
Figure 5-10 reflects a deployment configuration of a much more mature and responsible
team. Gone were the heady days of achieving an MVP, and we were far more in touch
with reality regarding the technology elements of our platform and the supporting
enterprise systems. We were also extremely fortunate to have two seasoned DevOps
Engineers join our team, who actually “knew what we did not know.” With their
experience, a far more stable and enterprise-ready Kubernetes cluster was quickly
established – the third iteration.
114
Chapter 5 Platform Architecture
One of the first questions raised regarded the need for a full-blown Kubernetes cluster
in the DMZ. They patiently explained, as a parent would to a child who wanted ice cream
before the main meal, that a simpler Docker Container platform deployment could be
used to achieve the same objective. Their contribution to the evolution of our DevOps
platform could be compared to a far more advanced alien race assisting cavemen who
had just discovered fire. This, too, has been a great lesson. If you are going to embrace new
technology, be it for a short-term MVP or a long-haul transformation project, be sure to
resource it with the right skill level or consider a subset of the technology or not using it at
all. Observing a master ply their craft is truly something to behold and our platform soon
had a working pipeline, and the team was soon issuing commands via instant message to
characters from Tolkien’s Middle-Earth to release code elements.
One of the most significant developments of this deployment was permission
from Network Security to allow internally hosted web applications to be exposed by a
Reverse Proxy in the DMZ. This milestone decision allowed the migration of the single
web application hosted in the DMZ Container Platform to the internal Kubernetes
cluster. This has optimized delivery as internal pipelines and network connectivity can
be leveraged and support simplified as the container and associated logs can easily
be accessed. We have chosen not to decommission the DMZ Container Platform and
are currently using it to host external applications that are not core to the Platform.
Applications which leverage the API Marketplace capability but fulfill a third-party
objective, for example, to synchronize Account transactions, are residents of this
platform.
T o-Be Configuration
As challenging and rewarding as finally establishing an enterprise-grade on-premises
Kubernetes platform has been, the team has reached the conclusion that this exercise
is much like keeping a lion as a pet. The platform demands constant attention and
dedicated support and if not controlled can gobble up an inexperienced handler.
Figure 5-11 reflects the plans for the next step of our deployment architecture. We
envisage running the various elements of the stack using Cloud infrastructure and
platform services. Given that components such as the API Gateway is a shared
instance, this will inevitably be a phased migration. Supporting elements, such as code
repositories and DevOps pipelines, also must be migrated to the Cloud.
115
Chapter 5 Platform Architecture
116
Chapter 5 Platform Architecture
Summary
Establishing the platform architecture for an API Marketplace has presented a
tremendous learning opportunity for our team. We realized that reading a blog post
detailing how Netflix deploys and operates applications only scratches the surface when
the team has to do it themselves, within a significantly different organizational context.
It allowed us hands-on exposure to elements like Docker for containerization, gRPC for
inter-service microservice communication, and Kubernetes for container management.
We consider deep technical components like ingresses, services, and pods as
offspring we have hand-raised and nurtured. Like parents with a newborn, the journey
has also been challenging. We have had to weather severe bouts of cholic when we
looked wearily at each other and wondered if we would make it through.
Equally, there have been moments of pride, when the platform took its first steps
as we scaled the number of pod replicas and breezed through a performance test. Our
platform, like a baby, has matured and is now entering a new phase of existence. The
benefit of time affords us a much better understanding of its operation, strengths, and
weaknesses. There is still much to be improved and optimized which is the reason I
consider an API Marketplace to be a living, breathing organism. The African proverb
“It takes a village to raise a child” sums up our experience as it would not have been
possible to have achieved this objective without the help and support of the Enterprise.
In the next chapters, we discuss how the Platform Architecture is used to support the
API products of the Marketplace, from Design to Development to Operations.
117
CHAPTER 6
Security
Establishing an API Marketplace can be like setting up an embassy for your organization
in a foreign and hostile territory. Although your intention is noble and your aim is to
help third-party providers leverage your products and services, it exposes the enterprise
to a range of new attack vectors every day. The stakes are incredibly high when precious
customer and other sensitive data are at risk. The mantra that everyone is responsible for
ensuring the safety and integrity of the platform is not to be taken lightly. Any breaches
across any of the API products could lead to negative public sentiment, impacting other
products, the Marketplace, and the greater organization.
Security is not simply the access mechanism to the API. It is important to consider
it as an element which permeates each layer of the platform – from a technical, people,
and process perspective. Fortunately, there are well-established patterns and security
standards which can be followed as a guideline to direct your implementation. It is also a
fine balancing act as it must be tailored to the requirements of your organization without
impacting developer adoption.
In the sections which follow, I will cover the security topics which may be applicable
to an API Marketplace implementation for different products, audiences, and stages in
their lifecycle. As covered in our earlier chapter on Regulation, there may be variants of
these standards for specific industries. We will examine the Open Banking variation in
more detail.
The dynamicity of the ever-changing security context is one which makes an API
Marketplace more challenging and interesting as it demands constant learning and
adaptation to stay safe. We are incredibly fortunate as there is an incredible amount of
literature, offerings, and perspectives available in this regard. Knowledge is critical to
understanding the landscape and to stay safe.
119
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 6 Security
Cross-Cutting Concern
Let us consider how security impacts various domains in an API Marketplace
implementation.
120
Chapter 6 Security
The intention of this section is not to scare you into shelving your plans for an API
Marketplace implementation until you can fully guarantee every aspect of security. The
aim is to highlight the various dimensions across which security must be considered.
Again, this will be tailored to the technical landscape and requirements of your
enterprise, and each platform will undoubtedly be unique in their implementation.
An approach that has worked exceedingly well for ours is to actively seek out regular
and rigorous review by teams from other domains – Information and Network Security,
Architecture, and Shared Enterprise Services. In all honesty, the feedback was not always
positive, and we had to refactor our solutions to mitigate. I can assure you that the
integrity of the result has certainly been worth the effort.
In the following sections, we will deep dive into the tip of the iceberg – API
security. This is just one of the many perspectives through which we need to consider a
Marketplace implementation. Understanding that security impacts almost every aspect
of your platform will help the technical team establish foundational elements and core
practices in the right way to prevent rework later.
121
Chapter 6 Security
API Security
The access mechanism for your API product is intrinsically linked to the type of
consumer and the nature of the solution. It can be considered in much the same way
as access to your home. Depending on where you live, there may be a security guard
at the entrance of your gated community to allow only residents in, your front door
might have a heavy-duty lock which only you and your family have a key to, while locks
on internal doors are probably never used. In the following sections, we will review
security approaches in the context in which they may be best applied and the associated
audience.
Open APIs
These interfaces typically provide reference or publicly accessible data. Examples
include locations of service stations, country codes, or weather information for a
specified location. Although the API may not require a security mechanism at all, it
is best to use, at a minimum, a Client ID and Secret as illustrated in Figure 6-1. This
has the benefit of understanding who is consuming your API – by way of a required
registration to receive credentials. The client identifier can also be used to provide
different service levels and, importantly, to restrict access to a rogue consumer without
impacting others.
There may be a wide audience for this type of product. From developers learning
how to consume APIs to established service providers looking for reliable source of
reference data.
122
Chapter 6 Security
this type of integration required custom, purpose-built interfaces and dedicated network
infrastructure, in the form of leased lines, between consumer and provider. As a result,
there was significant cost and time impact for the upfront provisioning. Although this
can be achieved by configuring a Virtual Private Network (VPN) between the parties
which uses public network infrastructure, it can also be achieved through the use of a
security certificate to simplify the integration pattern as illustrated in Figure 6-2.
123
Chapter 6 Security
The magic ingredient of end-user consent makes it possible to offer these APIs
to a wider range of third-party providers. Even with stringent security standards,
an unscrupulous third-party provider, once admitted into your ecosystem, has
opportunities to elicit additional customer data (one approach discussed later). It is
extremely important that third parties are screened and vetted to meet the due diligence
criteria set out by your implementation.
In the following section, we will dive into the detail of the OAuth process and discuss
some of the supporting background processes and variations to allow you better insight
into its operation.
OAuth
Simply, OAuth is an open-standard framework that provides applications the ability to
secure delegated access.
To understand how it works, consider the following scenario:
124
Chapter 6 Security
OAuth is the standard that facilitates this process to allow end users to confirm
identity and provide third-party applications restricted access to their data.
A
ctors and Scopes
Let us identify the actors or participants in this scenario, in order of appearance:
There are a few key concepts I would like to touch on. Although Google holds my
profile data on its infrastructure, I am the owner of the data. The traditional practice that
customer data belongs to the host organization has been reversed, and control has been
returned to its rightful owner – the end user.
The scope indicates the extent of data that I would like to share with third parties. In
the context of the above scenario, Lucid only requires my name, email address, language
preference, and profile picture from Google as shown in Figure 6-5.
125
Chapter 6 Security
Although my profile picture is not the greatest, I’m comfortable sharing this
information. Had Lucidchart requested full access to my Google Account – I would have
been more than a little reluctant as I would be providing access to my personal email,
calendar, and contacts. As you will note, Lucidchart only requested access to information
it specifically needed, nothing more. Within an OAuth context, this is the limited scope
or permission that I, as the Resource Owner, am happy to approve.
Before you move on, be sure to solidify the concepts of actors, roles they perform,
and scopes. Consider other scenarios, such as OAuth in a banking (or relevant to your
industry) context to identify the actors, roles, and scopes.
Application Registration
An important background process that is often missed in OAuth literature is the
interaction between the Client and Resource Server. The Resource Server may not be the
owner of my data but as a responsible service provider and as part of its due diligence
process, should only release data to verified parties. Any application that uses OAuth to
access its APIs must have authorization credentials that identify the application to the
Resource Server’s OAuth server. The Client will register an application with the Resource
Server, providing details regarding where the request will originate from and where users
should be redirected to.
A quick recap of this step:
• Each Application must specify (one or more) redirect URIs, and may
also provide (one or more) origin URIs.
127
Chapter 6 Security
3. The credentials are returned to the third party. At this time, the
third party has a Client ID and Secret. It is possible to change
configuration data of the Application – such as the redirect
URI. However, the Client ID may be fixed. Many API Gateway
implementations only provide the Secret at registration, and it will
be regenerated if lost.
128
Chapter 6 Security
129
Chapter 6 Security
In the following sections, we will dive into the process for retrieving an Access Token
for the following grant types:
• Client Credentials
• Authorization Code
• Refresh Token
C
lient Credentials
Figure 6-8 details the Client Credentials process flow.
130
Chapter 6 Security
3. At this time, the third party has an Access Token. Note that the
token may have a specified period of validity, typically 3,599
seconds.
A
uthorization Code
Figure 6-9 details the Authorization Code process flow.
131
Chapter 6 Security
132
Chapter 6 Security
3. The Client then redirects the user, by way of a HTTP 302, to the
constructed Authorization URL. This is a pivotal step in the
process as it requires direct interaction between Client and
Resource Server.
4. The Resource Server verifies the Client ID, redirect URI and scope
requested, and if valid, prompts the Resource Owner to confirm
identity (Authentication) and provide consent (Authorization).
133
Chapter 6 Security
c. Authorization Code
10. The Resource Server will locate the Application referenced by the
Client ID, verify that the Secret and redirect URI matches, and if a
valid Authorization Code is provided, will return an Access Token.
12. The access_token can be used to make calls to APIs – to which the
registered Application is subscribed to.
Refresh Token
As an Access Token is generally valid for short periods of time, typically an hour, the
Refresh Token grant type is used to access resources for extended periods. This also saves
the end user the inconvenience of having to re-authenticate and re-authorize once the
Access Token expires. It is important to note that in some scenarios, such as a once-
off Payment, tokens may only be used within a specific period (even shorter than the
expires_in value) and only once.
To prevent perpetual access, it is important to fix the duration for the refreshing of
tokens. As an example, tokens may only be refreshed for a maximum period of 6 months,
starting from the issuing of the first Access Token – after which the end user will have to
re-authenticate and re-authorize the access.
134
Chapter 6 Security
1. The Client initiates the request for a new Access Token providing
3. At this time, the third party has an Access Token. Note that the
access_token may have a specified period of validity, typically
3,599 seconds. The refresh_token is valid for a longer duration.
P
ermission Revocation
A key responsibility of the Resource Server is to provide the Resource Owner with visibility
and control over previous authorizations granted. The end user should be able to easily
view who has access, when it was granted, and what can be accessed. More importantly,
the ability to revoke access for a specific Client. This is typically achieved through a
user administration portal. Continuing the Lucidchart scenario, I can use the Account
Administration page provided by Google, find which third parties have access to my
account, and remove the access – as shown in Figure 6-11.
Some third parties may also provide end users with functionality to revoke access
or unlink an account. The Client (third party) initiates a call to the token revocation
endpoint of the Resource Server as notification of this event and to invalidate the
authorization and associated token:
136
Chapter 6 Security
137
Chapter 6 Security
138
Chapter 6 Security
• The Client uses the Client Credentials grant to confirm its identity
and ability to access to specific API products and receives an Access
Token. We refer to this token as a “light” token.
• The Client then registers an intent with the Resource Server using the
light token and receives an intent identifier as a reference.
• The Client includes the intent identifier in the Authorization URL and
initiates a customized Authorization Code flow.
• This allows the Resource Server to locate the original intent when it
receives the request from the Resource Owner redirect.
• The Client uses this “heavy” token for API calls to the Resource Server.
As you will note from the above, while there are additional steps in the flow, the use
of an intent affords additional security by
V
ulnerability
As you may have observed, the Authorization Code flow is underpinned by redirects
achieved using HTTP 302. Although important in its function, it provides an opportunity
for attack and is one of the biggest threats to the integrity of the process. There are
undoubtedly complex mechanisms of intercepting and redirecting network packets or
creating fake DNS records which experienced hackers could use to exploit a redirect.
As my career has been largely been dedicated to development rather than hacking, I
present a far simpler way in which a dishonest third party could phish or compromise an
end user’s credentials in Figure 6-13.
As the diagram indicates, as part of the Authorization Code flow, the Client can
maliciously redirect the end user to a fake provider page, which could easily be
constructed to appear like that of the Resource Server – and also be hosted on a domain
which closely matches the original. The end user would then be inputting their
credentials into a compromised site. The technical acumen required to achieve this
is elementary web development and hosting knowledge and considerably lower than
having to understand the TCP/IP stack or DNS. It is important and interesting to note
that the potential remedy to this attack is a process update to verify the integrity of third
parties before allowing them to participate in your ecosystem.
140
Chapter 6 Security
O
WASP
The Open Web Application Security Project (OWASP) is a non-profit foundation that
works to improve the security of software through its community-led open source
software projects, hundreds of chapters worldwide, tens of thousands of members, and
by hosting local and global conferences.
Security Top 10
The Top 10 API Security Risks identified by OWASP [[Link]
api-security] lists the following:
141
Chapter 6 Security
142
Chapter 6 Security
Recommendations
To address the risk of Excessive Data Exposure (API3), we use the following guidelines:
Most API Gateways provide out-of-the-box functionality to enable resource and rate
limiting, often with fine-grained control for different Quality of Service per consumer.
This should be leveraged to mitigate the Lack of Resources and Rate Limiting (API4).
To prevent Injection (API8), there is a clear separation of roles between logic
orchestrating microservices and integration components as detailed in Platform
Architecture. This measure limits the possibility of API input being used directly in
database queries.
The intense Security Review process, discussed next, helps significantly in
identifying and resolving potential issues.
143
Chapter 6 Security
S
ecurity Review
Security reports generated by application scanning tools sometimes run into tens or
hundreds of pages. Apart from having to reassure nervous Delivery Leads that the issues
are not as bad as it appears, it often feels like we’re running through a gauntlet. What
helps immensely is the realization that it is far better to find an issue during internal
testing which can be fixed, rather than reading about a security breach of your API
on your favorite technology news site. Our detailed and uncompromising process is
outlined in Figure 6-14.
144
Chapter 6 Security
• The security report provided from the external test is reviewed and
reclassified by Information Security – with severity typically being
bumped up a level. That is, medium to high and high to critical.
• Issues identified may also fall outside the team’s domain of control –
such as configuration updates needed on shared enterprise
components. In these cases, we still retain ownership of the issue
while it is being investigated and resolved by external teams.
• Security tests are often re-run once updates have been applied to
confirm resolution and identify new issues which may have been
introduced with the fixes.
Summary
In this chapter, we started by taking a wider view of the importance of Security in
an API Marketplace implementation. As noted, it touches on every domain and due
attention and importantly respect to this purpose is critical to the integrity and longevity
of your implementation. We then narrowed in on API security and considered three
integration patterns. The first is Open APIs which are generally accessible but require
credentials for tracking and controlling third-party access. Business to Business (B2B)
APIs are used for to achieve system-to-system integration and limited to a smaller, more
familiar audience. Using certificates as a security mechanism may simplify the network
requirements for this integration pattern.
145
Chapter 6 Security
Finally, we discussed the most popular and widely used, Business to Consumer
(B2C), pattern. With this pattern, an end user provides consent for a third party to
initiate a request on their behalf or to access their data. To understand how this can
be achieved using industry standards, we delved into significant detail of the OAuth
process. With a firm understanding of actors, scopes, grant types, and access tokens, we
reviewed supporting processes such as Application Registration and stepped through
the Client Credentials, Authorization Code, and Refresh Token grant types. The ability to
revoke permission is extremely important and is a non-negotiable requirement for any
implementation.
We then covered a variation of OAuth which is used for Open Banking and observed
how the intent plays a pivotal role in this approach. A way to compromise end-user
credentials was also discussed, and I would encourage you to continue actively seeking
out other opportunities for exploit. This would allow your team to pre-emptively address
these issues – the resolution may be an update to process instead of technology.
We examined the Open Web Application Security Project (OWASP) Top 10 API risks
and suggested how some of these could be addressed through smarter design, careful
development, and leveraging the capability of the products in our stack. Finally, we ran
the gauntlet of our iterative Security Review process which slowly but surely helps to
identify and resolve gaps in our armor.
Over my career I have been extremely fortunate to have worked with highly
skilled individuals who are as passionate about security as I am about integration.
I would encourage you to seek out these tomes of knowledge, sit at their feet, and
listen attentively and humbly while they will undoubtedly point out the flaws in your
implementation and use their sagely advice to make your platform battle-ready. Due to
the nature and area of operation of an API Marketplace, it will be under constant attack.
146
CHAPTER 7
API Design
Crafting the interface for an API is an activity that can be considered from a number of
perspectives. For a Developer, it is fairly trivial as the set of inputs and outputs are well
defined and if not, can be easily added later in the process. For an Enterprise Architect,
this is a burden akin to Atlas propping up the world on his shoulders as the interface
should be well thought through, be reusable by multiple consumers from the present
and future, and should be able to withstand any tectonic shifts from the backend
provider. For the API Product Owner, the interface should be clean, clear, and easy for
Third Parties to consume. Regulators would define an interface which caters for a wide
range of consumers which would require sophisticated documentation drawn up by ex-
NASA Apollo engineers.
At one end of the spectrum, Design is an extremely important phase of the
development lifecycle, and the gravity of making the right decisions can result in analysis
paralysis. Additional pressure is introduced into the system when the product will be
consumed by external third-party providers as changes or updates cannot be contained.
In an active API ecosystem, a poorly designed interface can result in low developer
adoption and possibly reputational damage to the product and the Marketplace.
At the other end, the API, although important, is simply a means to an end, and
getting a specification out as quickly as possible will ease pressure from a demanding
consumer. This might result in a custom interface which will satisfy just the one
consumer, but that injustice can be addressed later – with more time and energy.
The APIs in our Marketplace have been built from multiple perspectives and at
various points in the spectrum referenced above. This is a process that we are still
refining and optimizing. In this chapter, I will share our experience, learning, and
pitfalls to allow you more insight into our Design process. These can be adapted to your
Marketplace implementation. From a convention perspective, I refer to the interface
consumed by an external party as the northbound interface and the backend interface
consumed by the Marketplace as the southbound interface.
147
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 7 API Design
Design Strategy
Before we embark on the discussion regarding how to define APIs, let us pause briefly
and consider the following question:
Try to answer this as honestly as you can – there is no right or wrong response as it
ultimately comes down to the requirements from the enterprise. Is the organization’s
intention to establish a presence in the market and this is simply a tick-in-the-box
exercise to publish an API? In this case, the implicit value that could be added is that
the organization meets regulatory or compliance requirements. Or is the objective to
create more API products than a rival organization – with the preference on quantity
for increased bragging rights rather than quality. In this case, your Marketplace appears
closer to the top right quadrant of a popular survey. Perhaps this is a pilot initiative
with a single confirmed consumer with the requirement that the APIs will be used by
a larger audience later. Value in the short-term is to enable a single consumer and in
the medium-to-long-term, multiple consumers. It could also be a genuine response to
establish your organization as a Platform provider to enable a new digital channel for
third-party providers to leverage the capability of your enterprise to build and launch
their applications and services. This could result in long-term value for the organization
as it would create a new revenue stream.
It is vitally important to reflect on this question as it essentially drives the strategy
behind your API design. For example, regulatory requirements may have forced your
organization to expose APIs for third-party consumption. The first iteration of your
Marketplace could be to meet this objective by a regulatory deadline. The strategies
outlined below, which will be used to build your API products, are driven by the
objectives of the API Marketplace. Having a firm understanding of where trade-offs
have to be made will help to shape the identity of your APIs, its adoption, and areas of
improvement for later iterations.
148
Chapter 7 API Design
be added. The challenge with this type of integration lies in the mapping between the
northbound (external facing) and southbound (backend) interfaces. As the northbound
interface is designed to be as general as possible, there are typically a wide range of
inputs and myriads of combinations.
From our experience in implementing a PSD2 interface, we found that the
southbound interface belonged to a niche mainframe application which has been
loyally serving specific needs of the organization for many years. Our unenviable task
was synonymous to patching hundreds of fine fiber-optic strands on one side to tens of
vacuum tubes on the other. At the end of a mapping exercise to bridge the two interfaces
for this type of integration, I generally feel the same way when I find extra components
at the end of a pre-packaged product assembly. The way to establish confidence that the
mapping has been done correctly is to rigorously test the solution and have the backend
provider confirm requests are received and processed correctly.
A further drawback of this type of interface is that the organization loses its unique
identity. Consumers would rightfully argue that a unique identity for each provider
would significantly increase their development timelines. From the perspective of
a provider, standardization makes it difficult to stand out from the crowd. Your API
product simply becomes a new endpoint in the directory of providers. The mainframe
solution, although archaic, could have some marvelous functionality which a third
party could have leveraged. Unfortunately, this ray of sunshine would be covered by the
blanket of uniformity thrown across the interface.
Bottom Up
Most northbound interfaces are driven by their southbound counterparts. In contrast
with pre-defined APIs, these are products forged in the image of backend functionality.
The unique, beautiful rays of functionality sunshine, mentioned in the previous section,
that would otherwise be smothered by a standard interface, can shine brightly for the
world to see and consume. The challenge that now presents itself is in determining
which pieces of functionality and data to expose. In addition, special caution must be
taken to avoid bleeding data structures from the southbound interface. That is, external
consumers should not be impacted by subtle changes from the backend provider.
From an honest review of our API catalogue, there are a few which I am not entirely
proud of. These are also absent from our Developer Portal. There will come a time
during your Marketplace journey when the API production line cannot keep up with
149
Chapter 7 API Design
Consumer-Driven
This type of design strategy generally starts with requirements from a single consumer
with a key directive that the interface should be designed to support multiple consumers
in the future. Our platform was recently tasked with bridging the divide between a new,
externally hosted digital platform and core, internal enterprise capability. At the start of
the project, the Marketplace team took solemn oaths to build northbound interfaces that
would be reusable for other third-party providers. Evidence of our commitment to this
150
Chapter 7 API Design
goal can be seen from our API naming conventions and standards. It was designed in a
way that would allow easy consumption by other parties.
The impetus provided from this mission objective has resulted in southbound
integrations to almost every backend platform in the organization. When backend
providers challenged us, we stepped aside and let the momentum of the digital platform
juggernaut roll over them.
We soon realized that juggernauts are not delicate creatures as they also impacted
our delivery process. As our team received more and more consumer specific business
requirements, we struggled to maintain the sanctity of a generic, reusable interface. We
attempted to stand firm and clearly signaled that the changes would impact the reusability
and extensibility of the API. The logical left side of my brain agreed with the decision to
make the change as, at the time, there was only one consumer. The emotional right side was
gutted as this would result in us reneging on our promise of creating a reusable product.
We attempted to mitigate the spread of this contagion by first isolating payloads, then
operations, that would be consumer specific – with the view of rehabilitation at a later
point in time. Unfortunately, we have not been successful, and the current prognosis is
amputation of specific APIs in our catalogue. This may seem a tad dramatic, and I hope
you recall the analogy when you have a similar experience.
The key message that I would like to impart to you is this – if your journey starts with
a single consumer, choose your battles carefully. As illustrated in Figure 7-1, be sure to
abstract any key backend southbound integration into reusable integration components.
For your northbound interfaces, determine which can be isolated and split these off into
generic interfaces. As an example, Reference Data APIs are prime candidates as a generic
interface. Rather than designing for future consumers, who may never turn up, pay the
necessary respect due to your primary consumer by publishing a specific API that will
satisfy their requirements.
What helped me reached this conclusion is that without demand from this specific
consumer, we would not have any API product to start off with. I would like to impart
some sagely advice – don’t boil the ocean by trying to reach the target state on your
first move. Allow your platform the latitude to have consumer-specific interfaces with
the view of creating generic and reusable integration components for later use. That
is, instead of building a single product and slicing and dicing later, build multiple,
segmented products from the start.
I won’t lie – going back to the drawing board, especially as the colors of your mural
are starting to dry, is tough. It is only natural to want to defend the current position.
What helped was the realization that the new direction of the end product would result
in a simplified approach and greater developer adoption. I was lucky – we caught this
midway through development. There will be API products which might launch but will
need to return to the drawing board. This must be ingrained in the team culture – the
need to rework, refine, and optimize until the final product is perfect.
It should also be highlighted that running the gauntlet of the design review process
helps to solidify principles regarding the product definition. These principles proved
to be essential supports when we received a challenge from a backend team regarding
additional input elements. As much as the API can change, be ready to defend the
identity of the product you have created. In short, if you firmly believe in a particular
strategic direction, do not be afraid to stand firm.
Considerations
There are many factors to consider when designing an API. Some, to be considered
early in the process, will be used as a filter to separate the wheat from the chaff. Others
will be used to understand the form and function to ensure the delivered outcome can
achieve the desired capability. Stages could be explicit, such as detailed performance
requirements, or implicit, such as the navigation of architecture design reviews of
your organization. In the following sections, we consider some of these factors, our
experience and methodology during the design process to filter, understand, and build
better APIs.
153
Chapter 7 API Design
• What are the dependencies on downstream systems and what are the
timelines?
The output of this process is not necessarily a binary one. As part of understanding
the product, the team may shape it to enable better viability. Dependencies on
downstream systems and timelines could be mitigated through the use of a phased or
iterative rollout of the product. It may also be prudent to engage third parties regarding
the potential adoption of the product to determine demand. If the product leads to
future potential opportunities, it could be funded in the short term from an operational
perspective with the long-term view in mind.
An API product, although digital, is similar to a physical one. Before work
commences on the build, the team must have at least a high-level view of the time, cost,
and effort to create and operate it.
Requirements
Agility is one of our current team’s greatest strengths as we are able to respond, pivot, and
maneuver in light speed, in comparison to other parts of the enterprise. Unfortunately, it
is sometimes our Achilles’ Heel as we do not pause to consider the wider context of the
problem statement. Our mitigation to this threat, learnt through some tough lessons in
the operational environment, is to bolster our demand process with a clear definition of
the API requirements. It is still possible to maintain an Agile approach, but it is necessary
to have a clear view of the playing field and context of engagement.
This clarity can be achieved through Functional and Non-Functional requirements.
The very mention of this terminology is likely to result in a shudder from fellow
developers as this is synonymous with the traditional, sometimes hallowed practice
of Enterprise Architecture. Before you skip to the next section, consider the amount of
rework if you design and build a path for a solitary cyclist and a caravan of 18-wheeler
trucks arrives. Conversely, consider the development effort wasted for the reverse
scenario.
154
Chapter 7 API Design
Based on our experience, the following are some of the questions we now consider
before providing resourcing, development, testing, and delivery timeframe estimates:
It should be highlighted that these are some of the areas we consider when building
a new API. For some solutions, when working with a known backend, we consider just a
subset. In the spirit of agility, we also commence backend integration in parallel to allow
us to hit the ground running once the requirements have been established and a high-
level design is formulated.
155
Chapter 7 API Design
Caution should be advised when providing delivery estimates, even with the proviso
of revision as any estimate is likely to be considered as binding – especially in a high-
pressure environment. Another mitigation strategy, possibly easier to achieve during
the early phases of your implementation, is to launch an API under the ambit of a “beta”
banner. This allows some flexibility for rework if required. There must be a firm timeline
for this phase as a prolonged testing phase might scare off external consumers of your API.
Documentation
A key element, instrumental to the success of an API product, is documentation. I cannot
emphasize this enough. Unfortunately, from several years of development experience,
documentation is generally tacked on at the end. The greatest API product cannot and
will not achieve its potential without the requisite level of documentation to support it.
Just as the lines of code reflect a developer’s legacy, documentation that details the use of
the API represents a legacy the team will impart to future consumers. Details regarding
the API such as behavior and operation, parameters, inputs, and outputs should be
included in the definition, also referred to as the swagger, of the API. The relationship
between documentation and definition is symbiotic, and both should evolve, preferably
at the same rate and importantly, simultaneously.
This is a feat easier described than achieved and is one of the activities which must
be undertaken by the team rather than a single individual. As a Developer, I really enjoy
coding. An area of coding I sometimes consider a boggy marsh as it slows me down
is naming a variable or operation. The reason for my angst is that I want the name to
make good sense and to resonate with a future maintainer of my code. The same can be
said for documentation. The member of the team shaping the definition may be able to
provide only a few terse words or phrases to describe it. As the definition is reviewed, the
documentation must be peer reviewed, updated, then sent on for Engineering Lead and
Product Owner review and feedback. If team resourcing permits, this task would be best
achieved by a Technical Writer.
As highlighted in an earlier chapter regarding API Consumption, there are different
types of consumers of the API product. Technical documentation will satisfy the needs
of a Developer. Details and guidelines regarding the commercial use and application of
an API product are essential for a business audience. It is also necessary to market and
position an API to bring it to the attention of external consumers. The various types and
levels of documentation must be considered during the design phase of an API product.
156
Chapter 7 API Design
Governance
Governance is another topic that could scare the agile developer. However, it has
immense and wide-reaching benefits to the APIs the team will build, and the
Marketplace will host. It should be considered as early as possible in the development
lifecycle and continuously. I am sure you will agree that there are very few things as
disheartening as seeing a project or initiative, which you have invested significant
time and energy into, shelved due to non-compliance. Within our organization, the
Enterprise Architecture (EA) team is tasked with ensuring solutions are designed and
built in accordance with a specific direction for the enterprise.
Our relationship with the EA capability went through a metamorphosis, inversely
proportional to the maturity of the platform. Let me explain this statement. In our MVP
phase, we did our level best to skirt around Governance and Enterprise Architects.
The primary reason was that the Marketplace initiative, not to mention the underlying
technology, was so far from what the organization typically did that we were afraid that
we would arrive to work one morning and find out desks cordoned off with bureaucratic
red tape. I clearly recall our first submission at the Solution Alignment Forum where our
approach to get partial approval was to label the initiative as “Research & Development.”
That is, we were allowed to continue, but only under laboratory conditions and strictly
warned to return for further approval.
Over time, we discovered that the insight and advice from the Architecture review
process allowed us to navigate other areas of delivery more efficiently. For example,
having approval to use a document-based datastore afforded us the use of an enterprise
service.
We learnt and continue to learn how to navigate the Design Review process more
efficiently. The key principles are respect and humility. Respect for the process – the
governance structures which might seem arduous to delivery teams but is there to
protect the enterprise. Respect for the Enterprise Architects – at times, the questions and
feedback seemed completely out of context, but in hindsight has saved us a considerable
amount of time in the operational environment. Humility is one of the most important
attributes which is at the heart of our Governance journey. The ability to process
feedback and make the necessary changes will ultimately result in a platform which is in
alignment to enterprise standards.
Through a process of maturity and awareness, the project now allocates sufficient
time for thorough preparation for a Design Review. In addition, we have enlisted
the assistance of a Lead Architect, who acts as a journeyman for the submission,
157
Chapter 7 API Design
Access Mechanisms
There are many ways in which the API may be accessed. SOAP (Simple Object
Access Protocol) and REST (Representational State Transfer) are both web service
communication protocols. There are also exciting options like GraphQL which are
available. The approach should be determined by the type of consumer or client
accessing the API, programming language, environment, and application requirements.
Your Marketplace would be well equipped to have a number of options available and
the ability or flexibility to choose the best at design time. A large portion of public APIs
are REST APIs. I would suggest the first APIs published in your Marketplace are RESTful
as there are several resources and reference sites to benchmark against. In this section,
we discuss and contrast the different access mechanisms.
SOAP
SOAP exposes components of application logic as services rather than data. It is
programming language, platform, and transport agnostic. As an established World
Wide Web Consortium (W3C) standard, it has pre-built extensibility in the form of
error handling and automation. It is highly extensible through other protocols and
technologies.
In addition to WS-Security, it supports WS-Addressing, WS-Coordination, WS-
Reliable Messaging, and a host of other web services standards. If you need more robust
security, support for WS-Security offers additional assurances for data privacy and
integrity and provides support for identity verification through intermediaries rather
than just point-to-point, as provided by SSL. Another advantage is that it offers built-in
retry logic to compensate for failed communications. This comes at a cost as it is a more
heavyweight choice for web service access and as it uses a complex XML format, it tends
to be slower.
158
Chapter 7 API Design
REST
A RESTful API is an architectural style for an API that uses HTTP requests to access and
use data. Objects in REST are defined as addressable URIs, and are interacted with using
the built-in verbs of HTTP – specifically, GET to read, POST to create, PUT to update
and DELETE to delete, etc. The core concept is that everything is a resource. As it is
built in close alignment to HTTP, it can be used practically anywhere on the web and is
commonly used when exposing a public API over the Internet.
REST allows a greater variety of data formats and coupled with JavaScript Object
Notation (JSON), is generally considered easier to work with due to a smaller learning
curve. It offers better support for browser clients and does not require expensive tooling
to work with. As a more efficient approach, it is generally faster and uses less bandwidth
than SOAP.
GraphQL
GraphQL is an open-source query language for APIs, developed by Facebook in 2012 as
a data-fetching API. It has grown in popularity as it was open sourced in 2016. A graph
refers to resources that are more complex and relational. Fetching complicated graphs
requires round trips between the client and server. As a result, REST APIs often result in
over/under fetching. Over fetching is when more data is fetched than required, whereas
under fetching is the opposite, when not enough data is delivered upon fetching.
GraphQL is instead established around schema, queries, and resolvers and rather
aims to improve upon REST by allowing the client to ask for a specific piece of data, not
just the entire block. There is no need to process a long stream of data – you only get
what you ask for. And what you ask for could be compiled from several different REST
APIs. REST works well in the context of a thin client, such as a web application hosted in
a browser as a major part of the processing is done on the server. GraphQL leverages the
capability of a more powerful client, such as a mobile device which hosts an Application.
Patterns
An API product is similar to an iceberg, with only ten percent protruding above the
surface of the water, and a massive portion beneath. Third parties will only see the
polished, published interface and associated documentation. The core of the product,
159
Chapter 7 API Design
which might be more intricate, lies in the implementation. There are a number of
approaches for building the product and the following is by no means an exhaustive list.
As your Marketplace matures and evolves, you will add your own variant which will serve
the unique needs of your organization. It is easy to become entangled with classifying a
product into a specific pattern. Try to avoid this pitfall. As a digital platform, the products
do not necessarily conform to classic architecture convention. This is what affords the
platform agility and flexibility. In short, allow a product to color outside the lines.
Synchronous
Our first microservices were built using a Digital Integration framework which was
geared for integration into a single backend as illustrated in Figure 7-2. Back then, it
was completely plausible that there was only one backend to integrate to. After all, the
pure definition of a microservice is an atomic unit of function. In the early phases of the
platform, this pattern served most of our needs perfectly. This approach is also a great
starting point for most API platforms.
160
Chapter 7 API Design
If this sequence flow had a single write operation, it may meet the minimum criteria
to be allowed to continue to exist. Unfortunately, there are further write operations in
this process flow. To the more lenient developer or architect, this may be an acceptable
approach. My concern with this approach is in maintaining the consistency of a
transaction across the process flow. If the first write works and subsequent writes fail, the
transaction or request is in an inconsistent state. In traditional middleware platforms,
this is where message queues and rollbacks are critical to ensure transactionality. My
firm stance is that this type of integration logic is best maintained in an environment
which has the necessary tools and services to support it.
Unfortunately, the tactical approach yielded far better delivery times than the
strategic one, and pseudo-transactionality has been achieved with storing transient state
and replaying requests. My advice is to never allow your microservices to reach this level
of complexity as you’re building a house of cards. I refer to this type of microservice as a
Monolithic Microservice. Avoid it at all costs.
Asynchronous
We were initially fortunate as the backend platforms we integrated to responded within
milliseconds, seconds at worst. As we assimilated different backends and added more
business logic, we found the latency of requests steadily creeping up. For some API
operations, it took more than a minute to complete. Do not waste time and energy railing
against a mainframe application for taking minutes to provision a customer record.
Although minutes to a digital platform is a lifetime, in a mainframe context, it is light
speed.
161
Chapter 7 API Design
This quickly became an issue as the API Gateway timeout was set at 60 seconds. It
escalated into a significant issue when the custodians of the Gateway refused to allow us
to increase the timeout – and rightfully so. An API Gateway is not geared for long running
requests, and these types of transactions would impact other service consumers. Caught
between a rock, a backend platform which took as long as it took to service a request,
and a hard place, an API Gateway which allowed a maximum time for a request to be
processed, we had to find a new way of execution for these use-cases.
Unfortunately, our constraints did not end there. Like an escape artist bound,
submerged under water and under threat of an imminent shark attack, another
parameter we had to deal with was network firewall restrictions. The microservice was
not allowed access to a service outside the corporate network, without some elaborate
reverse proxying through the API Gateway, which would double development time.
Without this restriction, we could have simply implemented an async-callback
pattern shown in Figure 7-4. The caller initiates the request, passing a return URL
which is invoked at the end of the process. If your microservice platform is not hosted
in Alcatraz, this is a far more efficient asynchronous processing pattern as it allows an
event-driven architecture.
162
Chapter 7 API Design
163
Chapter 7 API Design
In true gladiator style, the team has elected to race both solutions all the way to
the staging environment. This allows us the flexibility to choose the best solution
as requirements for the API were clarified and as performance test results became
available.
From a traditional application development perspective, this may appear to
be extremely inefficient. I consider this to be one of the greatest advantages of our
Marketplace. A flexible architecture coupled with a highly agile and capable team allows
multiple solutions to be built and tested to determine the best approach to be used.
Lifecycle
The design process represents the embryonic phase of an API product which will grow,
change, age, and ultimately expire. If we consider an API product in this way, it allows us
the flexibility to evolve it and constantly make it better. Changes to the interface should
be made carefully as these impact consumers of the API. There are other dimensions
to consider, which can and should change. We consider some of these in the following
sections.
164
Chapter 7 API Design
Developer Experience
Feedback from actual consumers of the API is an incredibly vital input to the design
process. An API product approved by backend teams, Legal and Compliance, and
delivered by the Technical team with little end user value will stay on the shelf waiting
for its best before date to expire. We unfortunately have API products in our Marketplace
which fall into this category. While building the API, it can become easy to stumble into
the trap of “if you build it, they will come.” An early warning sign is difficulty in finding an
actual use-case that an API would support. Step into a third-party consumer’s shoes and
critically evaluate how it would help you achieve a specific outcome. If you have trouble
with this task, chances are that the third party will too.
Feedback from potential third parties should be solicited as early as possible
regarding demand and adoption. This might be a challenge during early phases of the
Marketplace as the developer community itself is still forming. Third-party adoption is
also the first step in the process and the relationship requires constant attention. During
the initial phases, assistance with understanding the function and use of the API can be
achieved using documentation, guides, and tutorials. As uptake increases and the API
gains traction, increased functionality can be added to the API product. As an example,
an Insurance API product may start with providing a quote for personal insurance
cover. A later iteration could include quote acceptance and policy issuing. Thereafter,
other types of cover could be added. Revisions and updates to log claims could also be
considered.
As this example illustrates, try to get a revision of the API product out as quickly as
possible instead of waiting for the full product set to be available. Defining a roadmap
of when features and functionality will be available is a plus but may not be a key
pre-requisite. That is, if there is strong third-party uptake of the initial API revision,
it may create momentum to convince backend enterprise teams to expose further
functionality. It may be tricky but try to keep the product roadmap flexible – more
popular or requested features should be allowed to bubble up to the top of the backlog.
A key mantra, highlighted in the chapter on Consumption is – without third-party
consumption, there would be no traffic. No traffic, no revenue. Revenue sustains the
Marketplace which exists to achieve the Vision. Third-party and developer reception and
feedback is a crucial element of the Design process.
165
Chapter 7 API Design
Versioning
One of the greatest advantages of an API is that multiple versions can exist
simultaneously. I will highlight at the outset that this is by no means a license for
poor design. Care and consideration must always be taken when publishing an
API. Versioning essentially decouples consumer and provider and allows both to
continue on their own release trajectory. If the functionality from a specific version
continues to satisfy the requirements of the consumer, there may be no need to move to
a later update. Newer versions of the API also allow the provider to publish additional
functionality which can be adopted by a subset of consumers.
Most API Gateways provide this capability natively, and the complexity of different
versions is handled at this level in the stack. Minor revisions are updates to an API
with no breaking interface changes, and on each deployment, all API consumers are
automatically subscribed to the updated product. If there are changes which will require
an update from a consumer, a new product is created which will require subscription
and update of endpoint configuration.
It is also important to consider the changes to the Developer Portal and supporting
documentation when adding a new API version. As the maturity of your platform grows,
Release Notes detailing the change for every update – from minor to intermediate to
major – should be published. This is also a signal regarding the transparency of the
Marketplace to your external developer community.
An approach which has helped our implementations immensely is providing early
access to new versions to only a subset of external consumers. This not only allows us
to determine consumption behavior, but to also determine gaps in coverage – be it in
API functionality, documentation, or understanding. Be warned that this is also a time-
consuming activity as it is often a many to one effort. The many in this case is many
members of the delivery team to the one external developer who could not consume the
API due to a misspelt variable.
On a final note, I would like to highlight that the identity of an API should stay the
same. Versioning should be used like different lenses of a telescope to adjust contrast
and focus to bring the product into better view. If there is a significant difference or
change in direction of the product, it may be prudent and more responsible to your
consumers to create a variant or possibly a new product.
166
Chapter 7 API Design
End of Life
A recent mail I received from a Development Manager of a backend team had me gob
smacked. It read as follows:
Message:
Hello Everyone,
These are currently disabled in DEV, TST and QA for more than a
month.
My first reaction was one of panic as I frantically checked the latest code in our
integration component to determine the versions our Platform consumed. This soon
gave way to relief as I found we were fortunately using API v3 and SOAP v8, respectively.
As the jolt of adrenalin dissipated, relief was replaced by anger. Although our platform
was safe, for now, this was extremely poor service from a key southbound provider.
Consider an application using an older version of the API in a production environment
which did not have the need to test within the last month. If this application was in
operational mode without a development capability, they would be in for a rude
awakening in just 10 days!
This was extremely callous and irresponsible behavior from the provider. If there was
a pressing need to retire the older versions of the interface in a short space of time, it is
the responsibility of the provider to draw a list of consumers – from API subscriptions
or security access configuration and then contact each one directly to confirm the older
version can be retired. Sending an email announcing the retirement of an API version in
10 days is simply not an acceptable practice.
This is an example of the consequence of an API built off the cuff, possibly to satisfy a
specific consumer requirement, without a defined lifecycle. The date of end of support/
retirement of an API must be clearly defined at the moment of its birth, when it is
published or when a new version is released. This follows the practice of any commercial
167
Chapter 7 API Design
Design Guidelines
In much the same way that an apprentice gets more adept and skilled with experience
and under the tutelage of a mentor, your team will fast become better at defining APIs.
As part of this process, there are generally accepted guidelines and standards to be
considered. These are platform and product agnostic and can be applied to almost
any definition. There are great examples and references of API Platforms, from Twilio
to Facebook to Google. These can be used as a guideline when defining the standards
and conventions for your Marketplace. We consider a subset of these guidelines in the
sections below.
Error Handling
Returning error information to a consumer is a key element of an API. HTTP status
codes, as detailed below, are generally considered the best practice to return the
execution result of an API call:
168
Chapter 7 API Design
As a point of departure, you can start with the following and add on as required:
• 200 – OK
may not have the luxury of a scaling containerized platform and could also be servicing
requests from several other channels. A burst of requests from your Marketplace could
result in high system load, failed transactions, and possibly system outages. As an API
designer, one of your most important responsibilities is to not only protect your platform,
but also supporting platforms.
The mechanisms to achieve this and increase performance is to specify request
filters and paginate responses. Filters can help prevent broad queries from reaching
downstream systems. Limits and offsets make it easy for developers to paginate objects.
This will also lead to more predictable execution times as processing is not linked to the
size of the dataset or complexity of the query.
170
Chapter 7 API Design
It should be noted that an SDK is not a silver bullet and the support and ongoing
effort of maintaining client-side code should be clearly understood before pursuing this
measure.
Summary
API Design is one of the most exciting but sometimes overwhelming domains in
building a Marketplace. In this chapter, we discussed how the definition and objective
of the APIs are influenced, implicitly or explicitly, by the organizational strategy. We
highlighted key considerations to filter, understand, and support the design process.
Access mechanisms – traditional, current, and future – SOAP, REST, and GraphQL,
respectively, were also reviewed. Patterns regarding implementation, the lifecycle of an
API, and guidelines were also discussed. The golden thread of the design philosophy is
that the Marketplace is an extension of the organization and its APIs are a reflection of its
identity.
The output of the Design phase is the API blueprint which is the input into the
Development phase which is the topic of the next chapter. In a traditional waterfall
approach software development lifecycle, these were two clearly defined and separated
phases. Architects passed the baton to developers and returned to their ivory towers to
ponder over the next perplexing business requirement. In an agile delivery approach,
the designers are very much part of the delivery capability – in our project, the designers
and developers are often the same people. This allows an iterative approach to overall
delivery of an API product.
171
CHAPTER 8
API Development
Of all the phases in the software development lifecycle, Development is my favorite.
This is when life is breathed into designs and postulations and hypotheses can finally
be tested. Unlike other software domains, the complexity of implementation, in an API
context, is shielded by the interface. As any seasoned integration engineer will confirm,
the interface allows the team to maintain a poker face regarding the level of completion
of development. On many occasions, across different projects, I have sometimes
published an API with a wafer-thin implementation to either get off the critical path of a
maniacal project manager or to shift pressure to the consumer by bluffing with a show of
readiness for integration testing.
This phase is not without its challenges. There are often times during construction
of the bridge between two systems that the realization slowly dawns that the complexity
of integration is far greater than anticipated. Any seasoned integration engineer will
also attest to the fear of not having the required information available at the point
of connection. This can be compared to the moment when you’re wrapping up a
10,000-piece puzzle and find 3 pieces missing. If this were not bad enough, this generally
happens on one of those solutions with a wafer-thin implementation!
Throughout my career, I have found that the development rollercoaster never follows
the same route. This is possibly the primary reason why I love integration engineering.
From the initial cordial meet-and-greet with representatives from an external team to the
techno-jargon exchanges between developers, to the flurry of heated exchanges between
teams to resolve issues, to the required diplomacy with network security to unblock
firewalls, leading to the adrenalin rush of the first system handshake and finally to the
relief of seeing it work in an operational context – there is always a variation that keeps it
exciting. In this chapter, we delve into the detail of a number of key areas which support
the development of an API.
173
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 8 API Development
Returning to the reference data requirement, the first iteration to get out the door as
quickly as possible, is the pure retrieval of data. By exposing an API which responds to a
request, even with high latencies, the consumer can get a feel for the integration – from
interface specification to the data returned. This strategy should be followed even if
the requirement for improved performance was specified at design time or later during
performance testing. Given a choice between better performance or faster development,
a project manager under aggressive delivery timelines is likely to choose the latter. A
middle ground to the performance requirement may be the implementation of a cache
on the client side.
This philosophy borrows heavily from the motto of Facebook:
Done is better than perfect.
Resist the temptation to optimize an interface early in its lifecycle. Start simple and
iterate. Focus on the main tasks such as mapping from source to target. Identify areas
of improvement, such as caching for performance, paging, and filtering. Also be sure to
consider other areas, which may not be as exciting to develop – such as security, validation,
and error handling. With a functioning API, even in the Development environment,
prioritize requirements with help from the Product Owner and the Engineering Lead. From
years of experience, I am quite certain that security, reliability, and consistency would be
chosen over performance. Be sure to keep the objective of the API in focus at all times.
T eam Structure
Contrary to popular belief, development is more than a lone developer banging away at a
keyboard in a semi-dark room. Borrowing from an African proverb that it takes a village to
raise a child, it is a team effort to deliver an API. The product is more than just lines of code
but is dependent on the following roles during its journey from design to implementation.
D
elivery Lead(s)
Delivery leads are responsible for coordination and scheduling of activities to build
the product. This is a challenging task and requires careful coordination across several
streams, as illustrated in Figure 8-1, to ensure timelines can be met. A significant
amount of diplomacy is required as external teams and systems may provide critical
dependencies and each element must be carefully orchestrated to minimize delays.
175
Chapter 8 API Development
Let us consider how some of the external entities take part in the development
process and the responsibilities of the Delivery Lead:
176
Chapter 8 API Development
As there could be a number of APIs in development at any point in time, the Delivery
Lead has insight across multiple products and may prioritize the delivery of one product
over another. For example, if a more urgent API requires additional developers, the
teams may have to be rebalanced.
A valuable lesson, from years of project experience, is that there is a limit to the
number of people you can throw at a problem. That is, some tasks take a specific amount
of time and cannot be delivered faster with additional team members. It is essential that
the team management understands and appreciates this concept as the adage of too
many cooks spoil the broth could very easily come true as time could be lost by time lost
bringing new members up to speed and splitting tasks could result in dependencies and
budget over-runs.
As there are several balls to juggle, a strategy which has worked remarkably well for
our implementation was to divide the Delivery Lead roles among individuals having
commercial or technical focus. This allows us to have a person dedicated to chasing
commercial objectives such as Finance and Risk and another person focused on closing
out technical targets such as approvals from Architecture and Security. There are areas of
overlap which reduces a single person delivery – the technically inclined Lead can draw
on assistance from the Project sponsor, and similarly the commercial Lead is supported
by the Engineering team if his counterpart is not available. This dynamic duo, as I like
to refer to them, ensures that all requirements of the delivery spectrum are considered
which keeps our project in equilibrium.
Developers
Integration development, by its nature, is generally fast paced as the interface between
two systems is often on the critical path for overall project delivery. Whereas traditional
project timelines generally run into months, our delivery targets are sprints, which
could be a week at minimum, two weeks at maximum. The driver is that third-party
consumers, generally working in hyper-speed paced environments, also have faster
release cycles making time to market a critical factor.
177
Chapter 8 API Development
Our philosophy to handle the rapid delivery cycles is to iterate on an API product in
each release. That is, instead of waiting three months for a big-bang rollout, we provide
basic functionality and update on each deployment. This does add some complexity
to development as fixes or updates to a previous version may be required while work is
underway on a new version.
There are many facets to consider as part of the Developer journey. Let us consider a
few, which I consider key to success.
178
Chapter 8 API Development
Each team will have their own variant of development practice tailored to the host
organization. It is extremely important that all stakeholders, internal and external, are
aligned and for developers to manage expectations regarding the level and quality of
solution delivery during planning sessions. If timelines are reduced, all members of the
team should be aware and accept that elements such as testing and documentation will
have to be revisited. Instead of ignoring these issues, address it at the outset and plan
accordingly, as a team. A key to the success of our implementation is that development is
a team effort.
179
Chapter 8 API Development
Quality Assurance
This is one of the most vital pillars of support in our delivery process. As a signal of
importance, the QA or test engineer can exercise a veto to stop a release. As delivery
objectives are aggressive, developers tend to test in a vacuum and primarily on happy-
path scenarios. Integration testing is possibly the first time the solution is tested across
different systems and in various contexts.
As part of the testing effort, the solution must be subjected to various levels of
scrutiny, from standard to error to exceptional scenarios. Standard, functional and error
conditions can be simulated by providing a range of valid and invalid inputs. Simulating
exceptional scenarios may require bringing down connectivity components to backends
to determine application behavior. A vital input of scenarios and conditions to be tested
may be provided by the Operations team from experience with regular production
releases.
As we have evolved our testing capability significantly over some time, we now also
consider the following sub-domains:
180
Chapter 8 API Development
Delivery Approach
Our Marketplace came into existence at a time when the organization had made a
conscious decision to shift to a more agile delivery approach. A new Way of Work
was quickly established, and it was not uncommon to find business units which had
previously operated along more traditional lines huddled around a Kanban board for the
morning standup. Our delivery philosophy has always been based on Agile principles,
and we have adapted and tailored our approach over time to meet unique requirements.
The initial strategy for the Marketplace was more tactical. The primary objective
of the team was simply to launch an API Marketplace with the hope that third-party
providers would come. As a result, delivery targets and sprint objectives were technically
focused which kept the team busy but did little to establish much needed roots for the
platform.
A dedicated Product Owner was assigned to the initiative, and attempted to shift
focus, but was often overwhelmed by a stubborn technical team. Fortunately, the
platform was identified as an enabler to a much larger organizational objective which
mandated more process and structure operationally and more direction and focus
commercially. This has necessitated better planning and use of time, development
capacity, and budget to achieve strategic objectives for the Marketplace.
The following sections detail our process, which is still evolving, for the handling of
requirements as it enters the Delivery phase of its lifecycle.
181
Chapter 8 API Development
The aim of these sessions is to define, at a high level, strategic objectives for the coming
quarter in alignment with other external initiatives. It is also highly collaborative and seeks
to find the middle ground to allow planned initiatives to continue without interruption but
to also steer the Marketplace to be in a good position for future opportunities.
In subsequent planning sessions, which are scheduled more frequently and
described in the next section, these outlined objectives are used as a compass to ensure
our bearing is correct and the platform is headed in the right direction. The team
ethos also allows for an update of the objectives if required. That is, if the organization
requires a shift in focus to deliver a requirement of more business or customer value, the
leadership of the team will reconvene to determine how it can be achieved.
Planning
During early phases of the implementation, planning was an all-day affair, with the
full team in attendance. The aim was to provide visibility to all members of the team
regarding upcoming requirements, and to solicit feedback and sizing of tasks. The
intention was noble, but the result was that the team generally lost a full day from a
sprint and often still had to investigate tasks outside the session to provide estimates.
As part of our current process, a high-level Impact Assessment (IA) is compiled by the
Engineering Lead at Design time with ad hoc assistance from the team to resolve any
182
Chapter 8 API Development
technical queries. The IA provides an indication of time and resourcing required, from
which a cost estimate can be determined.
As actual development time is precious, we try to use as little as possible by requiring
the technical team to join sessions only if necessary. To achieve this, the Planning effort
is split into two rounds.
In the first round, the Platform Executive, Product Owner, Delivery, and Engineering
Leads meet to discuss the delivery objectives for upcoming sprints. This must align with
the quarterly strategic targets. Requirements are also prioritized, and there is an initial
indication of which developer will be assigned to which task.
With this view in hand, a second session is scheduled with the team to provide the
goals of the next sprint. In most cases, this is not the first time the team has been exposed
to the requirement as their input was considered as part of the Impact Assessment
activity. The sessions are focused as the objectives are clearly defined and developers do
not have to endure prolonged prioritization and strategy debates. During this session,
the Engineering Lead also provides a detailed breakdown of the solution and a clear
definition of done. It may be very possible that a requirement is split into phases and the
team has insight into this decision. Members of the team can voice concerns regarding
the objective and to highlight risks and possible issues with the upcoming work. This
allows the Delivery Lead greater visibility into the upcoming deliverable and to initiate
steps to mitigate potential risks and delays.
As detailed in Table 8-1, there may be several initiatives active, in various states, at
any given time.
DevOps
Change management
Post rollout support
183
Chapter 8 API Development
The concurrency of tasks is carefully managed by the Delivery Leads and although it
may add administrative complexity, affords the team flexibility to pivot to a new stream
if one lane becomes blocked due to delays from design approval or backend readiness.
This is a bane for Release Management as the Marketplace cannot forecast months in
advance what will be deployed to Production but is one of the greatest capabilities of our
team.
S
quads
Over the lifetime of our Marketplace, there have been larger initiatives which did not
fit into this rapid delivery mold. Initial attempts to bundle these initiatives resulted in a
team size of close to 30. As a result, sprint ceremonies such as planning, standup, and
retrospectives took a significant amount of time and were an inefficient use of the team’s
valuable time. Taking inspiration from Amazon’s “two-pizza team” rule, which states that
teams should be no larger than can be fed by two pizzas, we split the team into squads.
The definition of a squad is a self-organized, cross-functional team that has skills
to deliver a product end-to-end, with limited input from others. The squad should be
composed of people that can design, develop, test, and deploy the product.
We also consulted other teams which had experienced similar growth trajectories
and leveraged their insight and experience. A key lesson learnt was the formation of
a Platform squad which focused on advancing the capability and maturity of the base
Marketplace and which would support ongoing Product development.
As illustrated in Figure 8-2, the Platform squad aims to evolve the Marketplace by
focusing on initiatives such as the migration to Cloud, building Billing and Analytics
capabilities which are leveraged by Products deployed to the Marketplace. The Platform
squad is also long running but leaner, whereas the Product squads are spun up and
down as required, with larger team sizes. This also allows more efficient scheduling
of resources as teams are assembled on demand. Furthermore, the Platform squad is
funded by an operational expenditure (OPEX) budget, and Products squads are funded
by capital expenditure (CAPEX).
184
Chapter 8 API Development
Agile Methodology
Delivery is achieved in the duration of a sprint – which is a short, time-boxed period,
minimum a week, maximum two weeks. As detailed in Figure 8-3, functionality is
released in phases. The phased approach is based on a “Release Often” principle. We
have found that solutions with a prolonged stay in Development tend to become more
complex as changes from various requirements are made to shared components. A
telltale sign of this occurrence is if the production and testing versions start digressing
significantly. For example, production is on version 2.04 and test is on version 2.17.
The greater the divergence, the more changes have been applied which increases the
release risk.
185
Chapter 8 API Development
DevOps
When I first encountered the term “DevOps” many years ago, I jokingly commented that
many of the project teams I had worked on were doing this for some time – developers
were writing code in production to fix issues. Now, armed with the experience of working
with specialists, I understand and appreciate that this is a new and critical realm of
the software development lifecycle. The practice of DevOps is now fundamental to the
ongoing success of our Marketplace.
At the start of the implementation, it was an aspirational goal as the delivery team
leveraged a manual deployment process. As discussed in previous chapters, the project
was extremely fortunate to have the skills of experienced DevOps engineers for a period
which accelerated our progress significantly. From observation of these masters plying
their craft, I now consider DevOps engineering as infrastructure sorcery, which allows
the creation of new worlds, in our case – environments, with a magical incantation,
otherwise known as a Terraform script. The practice and benefit of this paradigm is
detailed. In the following sections, I will focus specifically on how DevOps supports our
development process.
186
Chapter 8 API Development
to deploy the required code elements to the test environment, gasp in frustration as
we found a missing configuration parameter, and finally breathe a sigh of relief when
the test engineer gave an all-clear signal. This was the first iteration of our (manual)
Continuous Integration process.
The process evolved, almost overnight, as the on-premises Container platform
was rebuilt. As part of the rebuild, the deployment process also changed dramatically.
Suddenly, pipelines were triggered on code commits which automatically built and
deployed to the next test environment. Once functionality was confirmed in lower test
environments, the developer would initiate a pull request which had to be reviewed and
approved before the code change could be merged into the main branch. This action
would also trigger a higher-function process which would deploy the component to a
staging environment. The deployment process would not set it as the active version. An
Instant Message (IM) had to be sent to a middle-earth wizard, Gandalf, a chatbot, who
would then magically update configuration in the Kubernetes cluster to route requests
to the new version. Gandalf only took instruction from specific hobbits on the team
which maintained the sanctity of the release process and readily assisted by reverting to
previous versions if an issue was encountered.
The deployment process was beautiful in its simplicity, shielded the development
team from significant backend complexity, and introduced an explicit, repeatable,
and reliable process to be followed for migrating code between environments. If the
deployment or test failed due to a missing configuration parameter or code bug, it forced
resolution at the source – which triggered the pipelines and process to resolve it. Our
implementation was extremely fortunate to have been visited by time-traveling DevOps
engineers from the future. Any time benefit was lost when they suddenly left, and the
team had to support and update a seemingly complex release process.
The key lesson I would like to impart, from this experience, is to build your CI
pipeline iteratively. Lay the foundation with the fundamental principle that there will be
no manual deployments. Then put in a simple process and iterate. There are great open-
source CI tools, such as Jenkins and Cloud offerings which can deploy to on-premises
infrastructure.
Once you have established a simple, stable, repeatable process, slowly phase in
elements such as versioning, chatbots, and automated tests. Automated tests are crucial
to Continuous Delivery, which is discussed in the next section.
187
Chapter 8 API Development
188
Chapter 8 API Development
Microservices
A recent post-mortem review of a batch synchronization solution, which had grown into
a monolith to address operational issues, provides a great example of how a Microservice
approach enables DevOps. Figure 8-4 provides a view of the As-Is approach on the left
and the proposed To-Be design on the right.
There are several benefits of decomposing the solution into smaller components.
From a design perspective, it allows a change from synchronous to asynchronous
process execution by adding a messaging platform. More importantly, from a DevOps
perspective, it shifts operational control and power away from the Developer to
Operations. With the earlier process, the original developer of the solution was always
required to discuss performance issues. The new approach allowed the DevOps team
to scale the runtime solution without any development changes. Concurrency could be
controlled through configuration by specifying the number of consumers of the message
queue. Connections to source and target systems could also be scaled independently
by adding in more replicas of middleware microservice pods based on defined service
levels. So DevOps is not limited to automated provisioning of infrastructure and CI/CD
pipelines – it is an important consideration of the detailed solution design.
189
Chapter 8 API Development
DevOps is a practice and must become part of the team ethos and culture. It is
a part of every step of the journey – we discuss Monitoring and Logging, another
key supporting element of the Operational domain in a later chapter. From a team
resourcing perspective, be sure to include one, possibly two, dedicated DevOps Engineer
roles. Establishing and iterating the CI/CD process is an important foundational
element, and a simple, basic process must be available as early as possible in the
development lifecycle to prevent the possibility of manual deployments.
Application Development
As discussed in the chapter detailing our Platform Architecture, we have been through
many iterations regarding the way our microservices are assembled. It is still an
ongoing activity as we find new and improved ways in which to achieve an objective.
The following sections detail our process and technology approaches to building
implementations which support products of the Marketplace.
Development Guidance
From the experience of several solutions which have reached the operational
environment, I would like to highlight the importance of keeping in constant contact
with developers throughout the development process. Agile environments are fast, and
this may sometimes result in chaos. Once the API design has been completed and the
integration approach is defined, it will be handed over to the development team to build.
This is the point where the vision of the Engineering Lead must be clearly
communicated to the developers to ensure the solution is built according to the correct
pattern. I like to think of this process as “painting the target.” It follows the military
approach of an infantryman in the field shining a laser onto a target which a missile fired
from hundreds of miles away can home in on. As teams are most likely geographically
dispersed, sometimes across continents and time zones, take nothing for granted. A
line between two boxes in a component diagram could be interpreted in a myriad of
ways by a developer. For example, the connection could be made synchronously or
asynchronously; it could be done via HTTP or gRPC.
The developer might not be aware of an available downstream integration
another team had just built and might unerringly duplicate effort. Be sure to outline
190
Chapter 8 API Development
the definition of done at the outset and to take the time to have detailed solution
implementation sessions at the start of the development process and at regular
checkpoints during the sprint.
An approach which worked extremely well for one of my most challenging projects,
even with a junior team was four standups, then a sit down. At the end of the week,
midway through the sprint, we conducted a detailed review with the team to determine
if delivery was on the right trajectory. These detailed reviews may even go down to the
code level. Regular checkpoints ensure that issues can be identified earlier, and there
is sufficient time to resolve. Without regular reviews, the issue will most likely be found
in the operational environment. This is a key process which must be ingrained into the
team’s delivery methodology. Note that this is not micromanagement or mistrust of the
developer but is a call for the senior members of the team to take more responsibility for
the end delivery.
API Gateway
I consider this element in much the same light as a passport control function at an
international airport. Each API Gateway product implementation, from various software
vendors, may have a unique set of features and capabilities. For our implementation,
we have made a concerted decision to leverage the standard, vanilla capability to allow
easy migration in the future. A large driver behind this decision is that the Gateway
infrastructure is a shared, enterprise service and customization could impact future
upgrades or other tenants. The key principles of our API Gateway development are as
follows:
191
Chapter 8 API Development
M
icroservices
Figure 8-5 shows the key types of microservices in our platform, their interaction pattern,
and the use of platform services. To provide greater insight into the internal microservice
operation, I discuss the components in greater detail.
192
Chapter 8 API Development
194
Chapter 8 API Development
customer is an example of application logic. The process to create the customer record
is an example of business logic. As the Marketplace is a new channel to the enterprise, it
should leverage centrally owned and controlled business processes.
195
Chapter 8 API Development
the component waits for a second response in a best-effort approach to process the
request. If the first response indicates successful processing, there is no need to wait, and
execution continues.
P
latform Services
All microservices leverage platform services, which are packaged as an enterprise library
and imported during the build. As discussed in Platform Architecture, this provides a
uniform “utility service” layer which allows consistent support and management of the
microservices.
P
ortal Applications
A User Interface in an API Marketplace context may seem oxymoronic. From
implementation experience, web applications are one of the mainstays of the platform,
and front-end developers are a mandatory staffing requirement. Our implementation
has built custom applications for the following use-cases:
196
Chapter 8 API Development
Summary
In this chapter, we discussed a key development philosophy that technology serves
to support delivery of the API. We also identified roles that contribute to this activity,
implicitly by clearing blockers on the delivery path and explicitly by writing the
code and examined our approach to planning and managing concurrent activities.
Establishing a DevOps practice and adopting Continuous Integration/Continuous
Deployment principles helps streamline the development process, adds more stability
197
Chapter 8 API Development
and predictability, and supports existing and new development resources. Finally, we
delved into Application Development, strongly motivated for more communication and
guidance during this process and considered core elements of our platform, and finally
reviewed types and objectives of portal applications.
It is important to note that these approaches and processes took time to define
and refine and are still evolving. It has been tailored to the requirements of our
implementation such as a geographically distributed team and the use of shared
enterprise capabilities. Personality traits of a customer obsessed, broad-shouldered
Project Sponsor who constantly backs the team, Delivery Leads who set a high bar
and hate missing deadlines, stubborn Product Owners who will not compromise, and
Engineering Leads pedantic about leaving a legacy in code have also been instrumental
in forging a formidable delivery capability. In the next chapter, we discuss the Sandbox
environment, the role it plays in the API Marketplace ecosystem, and strategies regarding
how it can be implemented.
198
CHAPTER 9
Sandbox
The Sandbox is a demarcated, carefully cordoned off space which allows consumers
to test and use your APIs to get a feel for how they function. Of all the technical
challenges, achievements, and breakthroughs over the lifespan of our API Marketplace,
it was a revamp of the humble Sandbox which proved to be the tipping point for me
to write this book. Our initial Sandbox strategy was relatively simple and catered for a
specific spectrum of API products. As the platform grew, matured, and evolved, this
construct and approach remained unchanged. In much the same way that a Jitterbug
or Charleston step may function in today’s dance era, it just seemed out of place. The
team had recognized for some time that the approach needed a serious overhaul, but the
priority was always bumped down in favor of other “more important” deliverables.
This was possible due to the unique combination of API products and third-party
consumers within the platform ecosystem – as you will note from the strategies outlined
below. However, a perfect storm was brewing which mandated a specific scenario to be
tested and signed off before a key consumer could launch their offering. As fate would
have it, this scenario cut clean through our Sandbox strategy and threatened not only
to bring out one of our oldest Technical Debt skeletons from the closet but to also ask it
to do the Moonwalk. The pressure from the commercial team to launch the solution to
market was converted into momentum and impetus which brought upon not just the
re-engineering of our Sandbox – but also a re-imagining of its purpose and function for
our platform.
It is this unique synergy between engineering and imagination which is the core of
our implementation – and hopefully yours. From observation of this unique trait yet
again working its magic in and throughout our Marketplace, the call to at least attempt
to capture its essence in this book became too loud to ignore. In the following sections,
I will share my thoughts regarding Sandbox purpose, process, strategies, and ways in
which to implement them.
199
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 9 Sandbox
Purpose
I consider the following metaphors to best describe the purpose of a Sandbox –
kicking the tires, allowed to run around with scissors, try before you buy. As you
might imagine, making an investment or associated commitment to a specific
API provider is a significant decision. For intra organization projects, the risk
factor is minimal – project teams on both sides of the integration requirement
have little choice and must integrate. For an API Marketplace implementation
with pre-defined interfaces, consumers may be wary of having an expectation
of a three-pin plug and finding a two-prong euro socket – and rightfully so.
One of the functions of the Sandbox is to mitigate this concern. From
experience as an integration developer, I can assure you that reviewing an
interface specification, even a well-documented one, is far different than
initiating a request from code to an endpoint and receiving a response.
Developers get a tangible opportunity to map a specification to function and
importantly, can verify if the API is a fit for the use-case. “Fit” also needs to be
understood from many perspectives.
Consider the following abbreviated interface definition:
...
paths:
/customer
...
parameters:
-in: customerID
...
responses:
200:
...
Although the interface may satisfy the requirements for the third party,
the behavior of the interface is also a key factor. Suppose the above function is
made up of several queries to backend providers to compile the response and
as a result, the overall latency of the call is greater than 30 seconds. This latency
may have a significant impact on the end user’s experience and may impact the
decision to consume the operation. This may also result in a feature request for
an operation which provides a subset of the data with a faster response time.
200
Chapter 9 Sandbox
The Sandbox enables an engagement point for these discussions to occur. Its context,
relation, and function relative to the “Live” environment are shown in Figure 9-1. As the
diagram shows, a request that traverses the “Live” route eventually reaches a backend
provider. A request processed in a “Sandbox” context is serviced by an element I refer to
as a “Virtualiser.”
Used tactically, the Sandbox provides a unique opportunity for the Marketplace team
to publish an API product, for which an implementation does not exist. There could be
several reasons for this:
1. It can be used to determine the level and extent of consumer
demand for an API product. In our engagement with third-
party providers, we have learnt that there is often a gap between
intent and implementation – that is, consumers express interest
in an API but do not follow through. The Product Owner can
use a Sandbox product to determine actual consumption as an
indicator of third-party commitment.
201
Chapter 9 Sandbox
It is extremely important that this approach is used with great caution. As I’ve
mentioned previously – developers have a remarkable ability to sense a ruse and once
trust has been broken, it is difficult to regain. With that being said, the approach is to stay
one, preferably more, steps ahead of the consumer. Be open with the phase and objective
of the API – consider the disappointment if a developer builds a solution around the
product and the decision is made not to continue. Also, be clear on timelines. There is
little more frustrating for a third-party developer to have vague or non-committal dates
regarding availability of a specific product or feature in the Live environment.
It is also important to note that the “Sandbox” construct is maintained across
Development, Test, Staging, and Production environments as shown in Figure 9-2. This
decision has served to reinforce our commitment to ensuring that the Sandbox is fully
tested and verified internally before changes are deployed for external consumption. In
addition, the Production Sandbox environment is considered a full-blown operational
environment. Changes and updates are subject to the same governance, and any support
is provided on similar operational levels.
202
Chapter 9 Sandbox
Process
The Sandbox is as important to the host organization as it is to the third-party provider. It
plays a key role in our onboarding process and is used as a quality gate for many reviews.
The first review is for the third party to showcase the application that will consume the
APIs. This provides tangible indication of the use-case that will be launched to market.
It will also demonstrate successful consumption of the API and its role in the application.
The second review is for functional testing of the third-party application. Calls
originating from the consumer are traced through the Sandbox to confirm the accuracy
of request payloads and destinations. For this reason, our Sandbox environment is fully
representative of the Live environment, from an operational perspective, as it also has
the same support tools and processes.
It is important to note the support requirement and context for the Sandbox
environment. While the service levels may not be as stringent as Live and we may be
slightly more tolerant of service outages, the audience to be supported is developers.
This is typically the first port of call for the first application a developer will write, and
although the detail may be provided in the documentation, various types of requests and
approaches will be attempted as part of the API consumption process. Processes must be
well defined for Developer support, and it is imperative that the Sandbox environment
can withstand a barrage of ill-formed requests without keeling over and requiring
support intervention. Given the use-case, automatically restarting failed components or
stuck processes to ensure service availability may be an accepted practice.
As your Marketplace implementation matures, consider implementing a self-
service capability to facilitate Sandbox access. Registration and sign-up should be
seamless to allow development to start as soon as possible. Be sure to also highlight the
onboarding process and use of the Sandbox environment to potential consumers to align
expectations and provide an indication of timelines.
Sandbox Strategies
As our initial approach to the sandbox had not changed since the launch of the platform,
we chose to use the re-engineering opportunity for maximum impact. Fair enough –
there was an immediate need that had to be resolved urgently. But there were also a fair
amount of other skeletons that we were keeping in the Sandbox closet that were not fond
of any dance steps. With that being said, we were also careful to control the scope to stay
203
Chapter 9 Sandbox
focused on the task. Given the set of API products in our Marketplace, the first objective
was to identify the potential use-cases:
In the following sections, we dive into more detail of each Sandbox strategy by
examining the purpose it intends to fill, the approach, pros and cons which will drive its
use, and finally, how it can be achieved technically. I would be especially keen to learn of
any new or hybrid approaches you might have implemented for your platform.
beta
This strategy may be used for one of the following reasons:
• To define and shape an API product. The ability to test and refine
certain features could improve adoption and consumption in the
long run. This could also be used to address complexity of interfaces
long before a single line of implementation code is written.
204
Chapter 9 Sandbox
A
pproach
Tracking and recording of third-party consumption is essential for this approach as the
value is in the analysis and insight from the data. Usage patterns should clearly indicate
the consumers, APIs, and operations. The interpreted metrics could form the basis for
discussion with users of the API to identify what worked and what did not.
As these APIs may still be in the “inception” phase, performance data such as
latency of calls to backends may not be available. This must be considered as part of
the API design – for example, it may be prudent to use an async call-back approach to
compensate for possible long-running transactions.
Based on the nature of the API, it may be necessary to restrict access to a closed user
group. For sensitive or strategic APIs, only specific third parties may be allowed access to
retain institutional intellectual property and possibly competitive advantage.
Table 9-1 illustrates the pros and cons of this approach.
205
Chapter 9 Sandbox
U
se-Case
This strategy would typically be used during early ideation and conception phases of
API Product development. Can also be used to understand consumption patterns and
to shape an API product. It is important that third-party expectations are managed
accordingly since the API is a work-in-progress and subject to change and possible
termination. May also be used as a mechanism to engender trust with select third parties
through an “invite-only” access policy.
D
esign Considerations
As illustrated in Figure 9-3
B
ackend Simulation
This is best used for simple APIs which satisfy all the following conditions:
206
Chapter 9 Sandbox
A
pproach
The approach to create a Sandbox for these simple APIs is possibly the most complex as
it is achieved by simulating the backend provider. The API call travels through all the
elements of the Platform stack, blissfully unaware that it is executed within a Sandbox
context. When it reaches the middleware component for interaction with a backend
provider, the call is made to a “system virtualiser” which returns a pre-defined response
if it can match a specific value in the request. Different responses and behavior from
the simulated backend can be elicited by varying the input data. It is also possible to
simulate system failures and varying latencies for more representative behavior.
Table 9-2 illustrates the pros and cons of this approach.
Call traverses the full application stack for more Full deployment of all components to Sandbox
representative behavior environment has a higher resource footprint
Responses can be configured or parametrized Only suited to simple, read only operations
based on specific request data
The nature of API product allows a quick Static responses are used across all third-party
turnaround time for implementation and updates consumers – no or limited customization
Rigid or fixed response may potentially limit
additional use
U
se-Case
This approach is best suited for API products backed by a single provider for data
retrieval or read operations. It also functions well in contexts which support static
responses across many consumers. In our case, updates to the system virtualiser initially
required development effort. As the Testing team were delayed waiting for developer
207
Chapter 9 Sandbox
availability, the Test Lead spent time understanding the framework and has since taken
ownership of this capability. Scenarios are updated and added through the modification
and creation of new data files. At the last check, I found the Testing team writing code to
mimic a backend more accurately.
D
esign
As illustrated in Figure 9-4
S
hallow
As you might recall, there was a specific scenario which brought on the update to the
Sandbox. The early products in our platform were relatively simple. That is, there was
typically a single backend provider which could be serviced by the Backend Simulation
strategy. Over time, as more middleware components became available to integrate to
backend systems, microservice orchestration logic gradually grew ever more complex
to satisfy business requirements. This soon became a juggernaut which could not be
stopped due to delivery targets and objectives. Before we knew it, some of our APIs were
achieved with complex processes as shown in Figure 9-5.
208
Chapter 9 Sandbox
Unfortunately, the request to create a Sandbox version arrived before we could fulfill
our solemn promise to simplify the orchestration logic. The challenge with using the
established Backend Simulation approach was that it needed complex data setup as a
single transaction spanning multiple systems. What added to the complexity was the
write operations for some of the steps. After many attempts, the team soon realized that
the customization of the system virtualiser made it almost unsupportable and would be a
nightmare to update.
In a typical “think outside the box” approach, the solution we discovered was at
the furthest point from the source of the problem. By taking a step back and posing
the question from a consumer’s perspective, the primary objective of the Sandbox
integration was to get better acquainted with our APIs. Essentially, the third party is
simply looking for a representative response given a request. How this is achieved
behind the abstraction afforded by the interface is not a Sandbox concern. By reframing
the problem statement and considering it from a different context, the purpose of this
Sandbox strategy is to allow third parties to test API products with complex orchestration
logic spanning many backend systems, with potential write operations which cause state
changes.
209
Chapter 9 Sandbox
A
pproach
Instead of teaching skeletons to moonwalk, the answer was to intercept the request
early before it entered the microservice with complex logic and process the request in a
parallel, but shallow implementation. This pattern may appear to be very similar to the
beta approach. The key difference, however, is that this was an API product with defined
contracts we needed to maintain, and we had to satisfy the requirement of state changes
which would be managed per third party. The technical solution is discussed in further
detail later in this chapter.
The pros and cons of this approach are illustrated in Table 9-3.
Caters for APIs with complex business processes Not fully representative of the Live solution as
spanning multiple backend systems it is processed in a parallel flow
Ability to manage state per third party Additional software components to maintain
and support
The custom solution allows easy configuration and
update to handle new requirements
Smaller resource footprint as microservice and
middleware components are not deployed
U
se-Case
This approach allows a neat and elegant solution to keep the Sandbox APIs aligned with
the Live implementation. It also allows state to be maintained per third party to cater for
more detailed integration scenarios. To elaborate – a Shallow approach would provide
the same response in a ping-ack fashion. Using this strategy, third parties would receive
updated datasets based on operations performed. It should be considered for solutions
with medium to high complexity spanning two or more backend systems.
210
Chapter 9 Sandbox
D
esign
As illustrated in Figure 9-6
• Details of the Technical design for this approach are provided later in
this chapter.
S
emi-Live
The essence of this approach is that it connects the Sandbox environment to defined
Live interfaces. As the distribution graph discussed later in this chapter shows, this
is not a common Sandbox strategy. I have observed two use-cases which were highly
dependent on a Live interface.
The first is the Twilio Messaging environment. Developers can send messages which
terminate on a user’s device. Twilio ingeniously allowed testing of the WhatsApp API
by sending a specific keyword to a shared WhatsApp destination that links a mobile
number to a developer’s test account. Free credit of $20 in value is initially provided
and additional credit can be added for further testing. This is a fantastic example of the
ability to earn revenue from the Sandbox environment.
In the second instance, we found that it was necessary to connect to the Live security
service to generate a token which would be used on subsequent calls in the Sandbox
environment.
211
Chapter 9 Sandbox
A
pproach
As fond as I am of this strategy, I am equally wary. I consider it as the opening of
Pandora’s box and strongly advise caution regarding its use and potential abuse. The
approach can be implemented by simply updating endpoint configuration and routing
a request to a Live backend. Throttling of Sandbox API requests is critical as a third party
may unwittingly cause a Denial of Service by initiating a flood of requests. With a more
mature ecosystem, it may be possible to charge consumers for transactions.
The pros and cons of this approach are illustrated in Table 9-4.
More representative behavior of API requests Opens the Live environment to a development
audience
Hybrid capability saves time on simulating Requires additional support elements to regulate
backend services and monitor usage
Potential revenue stream by charging for Introduces a security risk as the Sandbox is now an
controlled or restricted access to Live access mechanism to Live elements and services
platforms
U
se-Case
The ability to invoke Live services affords a flexible, hybrid Sandbox capability which
must be carefully used and managed as it represents a potential security risk. It should
be used by exception, rather than the norm. There are great use-cases to support its
adoption – such as the Twilio messaging service previously mentioned. It is important
that the relevant systems and controls are put into place to manage and monitor its use.
It is best used to provide reference data, which is typically read only and can be openly
shared.
212
Chapter 9 Sandbox
D
esign
As illustrated in Figure 9-7
• Details of the Technical design for this approach are provided later in
this chapter.
Q
A Live
We have found this to be the least commonly used strategy. It has special function and
caters to a specific audience and use-case.
As previously mentioned, a foundational consumer of our platform is an internally
developed application that is hosted externally and uses the Marketplace to access
key enterprise services. Due to the nature of this consumer and the rapid pace of
development, access has been granted to the Quality Assurance (QA) Test environment
to verify end-to-end functionality before product releases.
213
Chapter 9 Sandbox
Although the pattern was isolated to this specific use-case, we have found that
for some APIs, testing in a “Live” context is sorely needed. In all honesty, simulating
a backend or shallow interception strategy may not sufficiently cover all responses
and use-cases of a backend provider. In these scenarios, the only way to get true
representation is to integrate directly to the backend for the full transaction.
A
pproach
The internal foundational consumer helped trailblaze the path to allow access from an
externally hosted system. Specific rules were added to the firewall to allow traffic from
defined source IPs. Instead of connecting to the Production Sandbox endpoints, the
destination was set as QA Live. Network and Information Security allowed the access
due to the nature and high profile of the consuming application. In all honesty, access
for other third-party providers is rarely permitted due to the sensitivity and nature of the
testing environment.
The pros and cons of this approach are described in Table 9-5.
Of all approaches, is the most representative of Impacted by the availability of systems and data
application behavior in a Production environment in the QA environment
No need to create a Sandbox version of the API – Adds additional load and traffic to shared
saves manpower components in the internal domain
Development – new releases or patches may
impact testing and needs to be scheduled
carefully
U
se-Case
There are very specific use-cases for this approach. The first is for consumers who are
internal to the organization, have insight into organizational processes and information,
and can tolerate varying service levels of availability and performance. The second is for
those situations when it is not possible to create a Sandbox version of the API and when it
is critical that the consuming application gets full representative behavior and responses
during testing. In this instance, the access policy should only allow temporary access.
214
Chapter 9 Sandbox
D
esign
As illustrated in Figure 9-8
• Many will consume the simpler API products which use a Backend
Simulation strategy.
215
Chapter 9 Sandbox
• Only a few, select third parties may have access to API products
which are backed with more complex Sandbox strategies – such as
Semi-Live and QA.
I like to think of access to Sandbox APIs in much the same way as a physical bank
branch. Anyone is allowed to enter the branch. Only bank personnel may enter the
staff-permitted areas of the building. Of the bank personnel, only senior and authorized
members are able to gain entry to sensitive spaces, such as the bank vault.
In much the same way, there are APIs and associated Sandbox environments, which
only select and authorized third parties may access. This strategy may appear to be
contrary to the approach of maximizing third-party consumption. The adage “horses for
courses” comes to mind and there will be API products in your stable which are suited
for specific consumers. Although it is possible to grant every third-party access to every
API product, the organization may not have the temperament or appetite for any third
party to access key areas or services – due to sensitivity of customer data and security
restrictions.
216
Chapter 9 Sandbox
I depict our access strategy in Figure 9-10 in a dartboard-like approach, starting with
the lowest security and most open on the outside, to the highest and most restricted at
the core or bullseye of the board. It is important to note that your access strategy may
differ based on the API products and governance policies of your organization – you may
choose to add, remove, or even reorder the sequence of layers.
B
uilding a Virtualiser
Our first and only Sandbox strategy until the redesign was Backend Simulation. To
achieve this, the team leveraged the Mountebank Open-Source project which allows a
pre-defined response to be returned given a specific request. A custom application was
deployed to our managed container platform. The application listened for requests on a
specific port and only endpoint configuration for integration components needed to be
changed to route to this service. For each new backend to be simulated, the application
was updated to
2. With the context of the function known, the function teased out
further information from the request using custom logic built
specifically for that integration solution.
217
Chapter 9 Sandbox
This approach leveraged the capability of the open-source solution to process the
request and custom code to compile the response.
Requirements
Using this implementation as a baseline, we formulated the following requirements for
the next iteration of the Virtualiser:
218
Chapter 9 Sandbox
I mplementation Options
With the humility and maturity that comes with years of software development
experience, we understood this was not a new problem, and many API platforms would
have a similar challenge. There are great Commercial-Off-The-Shelf (COTS) offerings
such as Computer Associate’s Service Virtualisation product. Unfortunately, this would
not only attract a license cost, but it would also require navigation of governance
processes for new software acquisition – which would result in lengthy timelines.
The team evaluated and tested two impressive Open-Source projects:
After much deliberation and debate, we based our final decision around the local
configuration which was core to both tools. A key requirement was that changes could be
made without a code update or deployment. Forking the projects and making it bend to our
will was also an option – this would require significant customization and maintenance.
Given our constraints and requirements, the route that we finally settled on was custom
development. This would result in the fastest and possibly most efficient resolution.
D
esign Philosophy
We used Mountebank as a reference and established two essential elements:
A predicate, which is a condition based on the combination of input parameters
which include the elements of an HTTP request and external configuration, listed in
Table 9-6.
219
Chapter 9 Sandbox
Method GET/POST/PUT/...
Path /customer
Query ?x=1&y=2
Header x-subscription-id
Body { name: ‘Tom Sawyer’ }
DB Config Database record retrieved using x-subscription-id
• Fuzzy logic to match on the key or key and value of a parameter – for
example, if the query contained the key x or the expression x=1.
• As many predicates could match, the one with the highest number of
matches is used.
220
Chapter 9 Sandbox
Sample Flow
Figure 9-11 and the sample configuration which follows provide more insight into the
process.
• The code execution element or “mini app” can maintain state. This
allows dynamic responses based on defined state.
221
Chapter 9 Sandbox
• [Link]
• If the value of categoryID is not specified, any value nnn will match.
{
"method": "GET",
"path": "/sport/catalogue",
"api": "SPORT",
"operation": "GetCatalogue",
"response": {
"query": [
{
"key": "product",
"source": "query",
"query": "categoryID"
}
]
},
"query": {
"categoryID": ""
}
}
• [Link] 11329
222
Chapter 9 Sandbox
{
"product": "11329",
"response": {
"action": "data",
"context": { .. },
"ErrorDescription": "OK",
"TxID": "0c772fd1-4203-4390-bc51-8c74edf0e979"
}
}
This Virtualiser design has been specifically tailored to meet the requirements of our
Marketplace implementation. There are other extensions we have added to use the value
of a header or query parameter to retrieve a database record from a specified collection
and use those values for additional matching. This solution outlines a sample design.
There are many updates and optimizations that you may apply for your Marketplace. If
you have any ideas you would like to share, please keep me posted.
Summary
In this chapter, we covered the Sandbox – which is an essential element of any API
Marketplace. We highlighted its purpose and the essential role it plays for a third-party
provider to understand your APIs and allows you to get a better understanding of the
consuming application. Several Sandbox strategies were discussed in detail describing
the approach, benefits and drawbacks, the use-case each strategy was best suited for,
and a high-level design.
I also provided a sample distribution showing which strategies were most used
as well as a strategy for providing access. We finally dove into the detail and defined
requirements for our custom Virtualiser which could be used to fulfill two Sandbox
strategies. From requirements, we then considered implementation options, from
commercial to open source, but finally chose to build a custom solution for maximum
flexibility. We finally outlined the core elements of the custom solution and processed a
sample request to get a better understanding of how it works.
223
Chapter 9 Sandbox
224
CHAPTER 10
API Operations
In contrast with other domains in the API Marketplace, which are hyper-flexible and able
to pivot or change direction on a dime, our realm of Operations is far more structured,
organized, and focused. The team runs on a strict regimen of process and structure and
is the foundation of the platform. Any other approach would result in a rapid descent
into chaos, and the implementation would quickly be classified under the banner of a
prototype. As the platform is an enabling ingredient for greater third-party applications,
any internal or supporting system failure is likely to trigger a ripple effect which
would eventually cause a larger impact resulting in poor perception of the third-party
consumer’s customer-facing product or service.
As this domain typically falls under an operational expenditure (OPEX) budget,
the knee-jerk reaction may be to keep costs down. Although our Marketplace may not
be end-customer facing, there may be significant reputational impact and industry
perception if the service levels are found to be flaky. As described in previous chapters,
a big effort is to attract external developers to the platform. It takes even more effort to
maintain the relationship and retain these consumers.
From experience, integration support has always been a challenging but rewarding
role. Without a doubt, my greatest learning from design to development to truly
understanding a solution and its underlying elements has been from time served in
Operations. Parameters and conditions well-defined during development. Even with
extensive testing scenarios and strenuous load tests, the environment may be fairly
isolated. From a project early in my career, I can clearly recall a senior engineer reporting
excitedly that he had run millions of transactions throughout the night on his notebook
without an issue. When our solution finally made it to production, we spent countless
nights over the next two years trying to resolve operational problems. The reason is
that a production environment is vastly different and traffic load, supporting system
availability, and unpredictable customer behavior should not be underestimated. It is
for this reason that I am of the firm belief that solution architects must spend time in an
Operational role to learn how to design more robust solutions.
225
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 10 API Operations
Unfortunately, fighting fire with fire by using a loose, tactical approach in a fast-
moving, high-traffic, chaotic operational environment will most likely result in failure
which could jeopardize the success and longevity of the platform. In this chapter, I
discuss our previous, current, and aspirational operational standards, processes, and
approaches to running a Marketplace successfully.
226
Chapter 10 API Operations
227
Chapter 10 API Operations
For minor product iterations, as shown in Figure 10-3, API versioning is a critical
element. As different versions of API products can co-exist, the decision as to when to
migrate is left to the third-party consumer. This is done with the proviso that specific
versions have a well-defined end of life. By providing well-defined release notes detailing
the changes in later versions, we also provide a clear signal to our consumers that it may
be in their best interest to move to the newer version – for reasons of improved security
or stability or possibly additional functionality.
the cause. We have found that blame results in fear which inhibits the team’s agility.
If an issue could have been identified during testing, it is taken as a learning for the
future. More often, the issue is related to data or scenarios unique to the production
environment which could not be replicated during testing. If the impact is significant
service degradation, the change is rolled back immediately. A strong DevOps capability
allows this to be achieved in a matter of minutes. This, too, is also a liberating capability
that underpins the team’s ability to deliver quickly. If the resolution can be achieved
quickly and with minimal, preferably zero risk, the Delivery Leads, in consultation with
the Engineering team, may make the decision to “fix forward.”
This is not a decision that is made lightly, and the practice, if left unchecked, could
lead to the cardinal sin of “coding in production.” Special caution must be taken to
ensure that in-progress development is not accidentally included as part of the update.
A well-defined code versioning strategy with release tags and branches is critical to
support this. If used wisely and sparingly, the inherent benefit of fixing forward is that
time is saved by not having to roll back the release which would keep the release pipeline
flowing. Depending on the nature of the issue, impact, frequency, and resolution
timeframe, it may be possible to implement the fix over a longer duration – which would
minimize additional errors creeping in through last-minute updates.
The requirement for a more flexible change and release strategy for agile, digital
solutions has been recognized by our organization, and significant effort has been put
into attempting to adapt to it. This statement must be fully qualified as the quality gates
have not been lowered – the processes have been streamlined to allow faster transition.
It is still a work in progress, and there is some way to go before we reach the Continuous
Deployment nirvana of Netflix – but with that being said, the service levels and potential
fallout for a Financial Institution would be far higher than a video streaming service.
229
Chapter 10 API Operations
Figure 10-5 provides a high-level view of our Release “funnel.” I like to think of
it as atoms bouncing around in a space which gets progressively smaller until they
eventually bounce out or must file in line orderly to move forward. At any given time,
there are a significant number of requirements, fixes, or prototypes in development.
Some prototypes may graduate to fully fledged solutions; others may be retired. The
readiness of supporting backend platforms will also determine which requirements will
transition to testing. Planning sessions, led by the Delivery Leads, will identify a potential
implementation date for specific solutions, which are bundled into a production
release. The goal is a release at a minimum of every two weeks. As soon as a view has
been determined, the necessary change control artifacts are assembled, and Release
Management is notified of the intention and date to deploy.
The artifacts that are required for the release process include the following:
230
Chapter 10 API Operations
D
evOps Practice
Like the humble sled, which was used to transport large and heavy objects during the
construction of the pyramids in Egypt, the practice of DevOps is the pivotal element
that underpins our operational environment, as illustrated in Figure 10-6. From
years of experience in an operational domain, regularly pulling back platforms from
a catastrophic demise by tweaking application server configuration or masterfully
rebuilding systems on the fly by hand, and in so doing have been responsible for creating
“snowflake environments,” this has been both a humbling and insightful experience.
A well-instrumented operational DevOps process starts even before the first line
of code is written. Code repositories, build pipelines, Continuous Integration (CI), and
migration processes (detailed in previous chapters) all form part of the process which
enables the DevOps practice from development, and which ultimately pervades into the
operational domain. In all honesty, as a developer who has witnessed a pre-DevOps era,
there are moments of frustration as a defined release process minimizes the opportunity
231
Chapter 10 API Operations
for tweaks and quick updates. As an Engineering Lead observing a well-oiled, well-
defined, repeatable, and reliable process with almost zero opportunity for tweaks and
quick updates, I am immensely grateful.
A repeatable process is key, particularly more so in an agile, fast-moving
environment as it enables rapid delivery with the ability to roll back if the need arises.
The ability to roll back reliably and rapidly in an operational context should not be
taken lightly. From years past, I can still clearly recall not only the disappointment and
embarrassment of rolling back a release but also the apprehension as backups were used
to restore a system and we waited to verify the rehydration process. The microservice
construct also helps immensely as it allows fine-grained control to roll back or roll
forward only ailing components. This ability affords our platform a safety net which
provides a level of confidence in much the same way that it would allow a highwire act to
push the envelope a little further.
As there are legacy elements in our platform architecture, not all systems have
a DevOps capability. The organization is well aware of this, and each system has
defined a roadmap to ultimately achieve this. For new implementations, such as the
Cloud Container platform we have recently migrated to, this is non-negotiable. The
environment is locked down with a “zero-touch” policy, and the only mechanism
available to make changes is via a DevOps pipeline as shown in Figure 10-7. Firm and
unrelenting commitment is possibly the only way to achieve this goal. If there is a
loophole or backdoor available, it will be discovered and exploited by the delivery team.
232
Chapter 10 API Operations
L ogging
From years spent in an integration environment, I consider logs to be the lifeblood of
any middleware solution. Logs are the primary mechanism I use during development
and support to get insight into the execution path of a request. There are possibly
far more elegant ways of using debugging tools to watch values on the stack, but for
me personally, a well-positioned [Link] or [Link] statement, acting as an
informer, can lead to the criminal mastermind in a bewildering “whodunnit” tracing
challenge.
As illustrated in Figure 10-8, there are various contexts in which a log may exist.
During development, there is typically a single file or standard output (stdout) stream to
tail. In a clustered environment, the number of logs is equal to the participating nodes.
In a microservice, container-oriented platform, there is an explosion of logs, and a single
request could traverse several pods, each of which is distributed across various nodes in
the cluster.
233
Chapter 10 API Operations
to always keep in mind that containers are transient – more could be created to handle
load, then destroyed as the load dissipates or the container could be restarted due to an
application exception. As logs are typically written to stdout, this could result in the loss
of the log with the shutdown or restart of the container instance.
There are options to mitigate the loss of the log, such as mounting persistent
storage which the container has access to. To minimize the complexity of the container
environment, the team addressed the requirement at an application level with a solution
detailed in Figure 10-9. All applications use a platform logging service, which has access
to an application context. The context is populated with a wide range of metadata, such
as the unique transaction identifier, name of the host application, and details of the
client initiating the request. With a logging request, supplementary data is retrieved from
the context, container and runtime, packaged into a simple JSON object which is then
fired to a load-balanced endpoint via UDP, which minimizes any performance impact to
the application as it is a fire-and-forget request. This is the entry point to an Enterprise
Elasticsearch, Logstash, and Kibana (ELK) service.
234
Chapter 10 API Operations
A system-specific Kafka topic is used to buffer requests and prevent message loss
as the capability is used by different platforms across the enterprise. This is another
example of our decision to leverage enterprise services to minimize operational
overhead which allows the team maximum focus on creating API value. The logging
event is then ingested into the ELK stack, described in more detail in the next section.
235
Chapter 10 API Operations
I have observed support engineers, sometimes relatively new to the team and having
been through a handful of knowledge sharing sessions, expertly navigate the Kibana
console to track down the cause of a request failure. By providing the unique identifier,
Elasticsearch eliminates the difficulty of scanning multiple logs and almost instantly
shows all entries which contain that reference, with a time-series graph which can be
used to drill into a specific timeframe.
Kibana goes further by allowing the user to view only a subset of fields. Additional
filters can be specified to narrow in on specific components. Kibana queries, in the form
of Kibana Query Language (KQL), can also be executed to widen or narrow the search
radius. The ELK stack is potentially the most important element of our operational
environment, and if time and effort is invested into mastering its capability by all
members of the team, it will most certainly yield great results across both development
and support.
M
onitoring
This area of operations follows the iceberg principle. On the surface, it appears relatively
simple. Upon closer examination, there is a lot more than meets the eye. It is an ongoing
journey, and on Day One of our implementation, we had only a fraction of the capability
that we have today. For much of our monitoring capability, we have leveraged enterprise
functionality which has resulted in lower costs from a software license perspective and
a smoother transition for our releases as change management boards are comfortable
that existing operational processes and tools are in use. In the following sections, we
examine areas of monitoring and discuss how the sum of the parts results in a greater
whole which allows our operational team to take a pre-emptive approach to managing
the platform.
E nvironment Monitoring
Almost every Network Operations or Command Centre environment has banks of
screens showing impressive dials and gauges which are constantly moving. From
my perspective, this is the traditional mechanism of monitoring an environment.
Line graphs, as shown in Figure 10-11, generally indicate CPU utilization or memory
consumption. When pre-defined thresholds are met, there is generally a flurry of activity
from the support personnel and a sigh of relief as the graph dips below the threshold.
236
Chapter 10 API Operations
The source of information for these metrics is generally an agent installed on the
physical or virtual host. This is the base level of monitoring and is used to determine if
there are any issues with the physical infrastructure. Its use is much like checking the
temperature of a patient. If the temperature or CPU is high, it is used as an indicator that
something is amiss. That is typically the extent of the information it can provide.
In an API or integration environment, the next level of monitoring is service or
endpoint monitoring, as shown in Figure 10-12. This is sometimes referred to as
synthetic monitoring. Periodic probes test the availability of a service. Our team
generally includes an isUp operation which simply returns a HTTP 200. False positives
may be eliminated by defining rules for alert activation, such as three consecutive
failures. As the request generally traverses the full network infrastructure route to the
endpoint, a problem with a load balancer or firewall configuration can also be identified
which may not be reported in the infrastructure monitoring dashboard.
237
Chapter 10 API Operations
238
Chapter 10 API Operations
An APM resolution path can be used to optimize the solution by identifying areas
of high-latency and potential bottlenecks in the system architecture. In complete
honesty, this could very well be the Holy Grail which operations personnel can use as
the single oracle of information for transaction execution. At this time, however, based
on my personal experience and observation of our current operational processes and
procedures, we have not yet reached this conclusion.
239
Chapter 10 API Operations
F unctional Monitoring
The objective of Functional Monitoring is to probe deeper than simply verifying
the availability of an API endpoint but to test and confirm its full operation. One of
my favorite interview questions to prospective technical team members is to ask
which stream of the project they would lean toward – project management, design,
development, testing, or support. Just for reference – project management was a
“loaded” option and for the unfortunate few who selected this, it was the end of the
line. As many would love to write code, the most popular response is development, with
almost no votes for support. Evidence of my belief that it is possible to write a significant
amount of code in an operational role is presented in Figure 10-14 – an application,
nicknamed “Homer Knows” which I developed for internal monitoring of our platform.
A key element of our Marketplace is the OAuth process flow. This is made up of a
sequence of API calls, with redirects to a web user interface (UI) prompting the user to
authenticate and authorize the request. We were able to verify only the early API calls,
but only discovered issues with the UI and later calls when third parties indicated an
outage. From an operational perspective, it troubled me that our approach was reactive,
240
Chapter 10 API Operations
and I used this as motivation to build a custom application, accessible via desktop or
mobile, which simulated a user (Homer Simpson) running through the flow on a regular
schedule triggered by a simple cron script. If the process succeeded or failed, Homer
would know. In addition to learning a new mobile application framework, this exercise
afforded me the opportunity to consume the API in much the same way that a third
party would. Continuing our medical analogy, it allows the operations team to observe a
patient during a potential incident which could reveal the root cause in real-time.
Telemetry
A dimension of Monitoring which particularly appeals to me is Telemetry. I first came
across this concept from watching Formula One (F1) racing. As the car moved around
the circuit, the race engineers were able to get detailed information about every facet of
the machine. This possibly afforded the pit crew incredible insight into the operation of
the car and if used correctly, could be used strategically for an extra ounce of competitive
advantage which would ultimately win the race.
Leading on from this revelation is firstly the amount of data which is constantly
pouring in – from tire pressure levels and temperature to remaining fuel to oil
temperatures to airflow, there are possibly tens if not hundreds or thousands of metrics
to be scoured through. The true beauty of telemetry is that it affords remote control of
the source. Present F1 regulation may not allow, but in previous years, the race engineers
were able to change the configuration of the car remotely. For example, if they found that
engine temperatures were dangerously high, the race engineer (in consultation with the
driver) could lower the maximum revolutions per gear to preserve the engine until the
end of the race.
From a software engineering perspective, this is extremely exciting as it allows the
operations team to make “runtime” configuration changes to the solution for optimized
performance or possibly to preserve application availability. Examples of changes
include adding more replicas or instances of a container to handle anticipated traffic,
dynamically changing endpoint configuration using an environment variable strategy
or displaying and removing maintenance pages during change windows. It should be
noted that the objective of telemetry is not to make massive changes to the operational
domain but affords the ability for “remote control” to make subtle course corrections or
updates. In an operational environment which cannot afford downtime, this is certainly
an extremely versatile weapon to have in your arsenal.
241
Chapter 10 API Operations
Alerting
A key lesson learnt is that a poor alerting strategy can quickly result in operational
process failure. As the platform experienced an increase in volume, the number of alerts
sent out overwhelmed the support team. Detailed investigation revealed that most alerts
were due to data issues or downstream problems, which the Marketplace support team
could do little to remediate. Within the mass of unactionable items (noise) were real
system issues, which were increasingly missed, causing unnecessary delays in issue
resolution.
The approach we have since adopted for real-time alerting, in anticipation of high
traffic volumes, is that alerts are not sent on the “noise” but via a classification of the
errors found. Initially all new errors are alerted on. Upon consultation, the errors are
reclassified for alerting, if there is no immediate action that can be taken by the team.
The errors are still logged and tracked in the operational service desk, to allow data
to be rectified or downstream systems to make changes. In addition, all errors are
also reported in operational dashboards, and a daily report of all errors is sent to key
stakeholders, which assists with tracking volumes related to downstream systems.
In keeping with our strategy to leverage enterprise services where possible, the
platform was initially configured to leverage the alerting capability of the organization
which allowed alerts to be sent to standby engineers via various channels such as email
and text message (SMS). A challenge with emails, even to a distribution group, is that
important alerts were missed in a slew of messages, replies regarding investigation
or resolution on a specific thread caused even more messages and finding or tracing
through previous incidents meant having to rummage through an email archive. The
drawback of using SMS is the cost due to mobile network charges. It soon became
apparent that a traditional mechanism would not be an ideal fit and an alternative
approach would be needed.
An alluring solution was integration to popular communications platforms like
Slack, which other teams in the digital space were using. This had the potential to
propel our alerting to the other end of the capability spectrum. Upon deeper reflection
regarding this approach, we identified a few potential drawbacks. Using a non-enterprise
standard would result in significant divergence from the organization strategy,
integration connectivity challenges to the Slack service, and the requirement that every
member of the team would need to have additional software installed and configured –
sometimes on a personal device, not to mention the overhead of administering the
service.
242
Chapter 10 API Operations
Support
In this section, we discuss the “human” element of our support capability. The best
solutions are built with consideration and awareness of people, process, and technology.
As the people element, the members of the support team draw on the technology such as
logging and monitoring and processes, such as Incident Management, to maintain the
health and stability of the Marketplace. With the Marketplace requiring 24x7 attention,
a significant debt of gratitude is owed to these support engineers in our team. We
delve into more detail by discussing the structure of the support team, our approach
to transition solutions from development to operations, and our internal and external
communications strategy.
Roles
A foundational principle of our organization’s digital playbook is the practice of “you
build it, you run it.” At first glance, this may appear to be an unforgiving “tough love”
approach to agile solution delivery. From first-hand observation, this is possibly one
of the greatest enablers to building responsible and reliable solutions. From prior
project experience, I have observed a clear demarcation between solution delivery and
operations – with the split spanning departments and divisions, each with its own staff
and organizational structure. Although the delineation allows clear focus, separation
of concerns and defined areas of responsibility, it inevitably results in an “us-and-
them” culture. Development teams may callously deploy solutions to production, and
operational teams may be reluctant to accept ownership unless onerous conditions have
been met.
243
Chapter 10 API Operations
The full-stack squad, discussed in the chapter detailing Development, also includes
support personnel who are responsible for the day-to-day operation of a solution.
This approach ensures that responsibility and accountability for an API product,
from inception to retirement, remains with the squad. If the solution has been poorly
designed or does not have the requisite amount of logging or error handling, for
example, the loop between operations and development is short and closed quickly.
It is also a standing rule that the developers of a solution will be responsible for post-
rollout support for 30 days. During this time, the developer will perform Level 1 support
while shadowed by operations personnel. Knowledge sharing sessions will also be
scheduled during this time to provide the support team with the information and skills
to operate and manage the solution. For more complex solution delivery, members of
the operational team may be assigned to the project team to allow more insight into the
internal execution and a seamless transition to support.
The following list details the roles within the support team:
244
Chapter 10 API Operations
Transition
Given the pace of delivery, API products within the Marketplace from multiple streams
are constantly delivered and updated to keep up with Product Owner requirements and
consumer demands. The operations capability is run as a shared service for maximum
efficiency. That is, a single team supports all API products, across various streams. This
allows the team to have one support engineer on Level 1/2 support, typically on a 24x7
schedule, which also reduces costs.
With new updates to the production environment, the delivery team is primarily
responsible for post-rollout support for a specified period. During this time, the
members of the operations team will provide shadow support to observe issues
which may arise and how it may be remediated. This may be viewed as “on-the-job
training” or implicit knowledge sharing. The delivery team also runs knowledge sharing
245
Chapter 10 API Operations
sessions, the number of which is proportional to the complexity of the release. The
delivery team views this period of transition in a “let me help you help me” light. That
is – the probability of support requests escalated for development support is inversely
proportional to the knowledge and skill of the support engineer. Simply put – an
empowered support engineer may be able to resolve an operational issue without
requiring assistance from a developer.
From personal experience, I have found that having to field support queries
midway through development requires context switching which seriously impacts my
delivery capability. Apart from the feeling of pride of having a solid, reliable solution in
production, this is more than enough reason for any developer to ensure the operations
team is suitably empowered to support their solution.
Communication Strategy
A key element of any Operational capability is an effective communications strategy.
With a high number of integration points inside and outside the organization, keeping
alignment across all stakeholders is no mean feat. The following is a sample of our
current mechanisms:
246
Chapter 10 API Operations
P
rocess
To allow a uniform approach to the handling of operational incidents, a lightweight
process flow, shown in Figure 10-15, is the primary reference for the Marketplace
support team. It provides different routes for issue remediation – if necessary, an
“Incident” is raised which is the organizational standard for communicating issues
across systems. As the reader will note, the process clearly defines a notification strategy
to keep all stakeholders aligned.
247
Chapter 10 API Operations
248
Chapter 10 API Operations
In the same way a small town sees an explosion in growth with the discovery of gold,
the Platform grew with the addition of new API products built by many delivery streams
working concurrently, with railways being built to new backend providers and third-
party providers flocking in to consume the APIs. Issues piled up and the gun-slinging
sheriff approach of maintaining the environment quickly became a single point of
failure.
A key element to supporting the environment has been the implementation of a
service desk to log, track, and report on issues. Support engineers were given clear
instructions that requests which required more than a few minutes to resolve were
to be logged diligently. The time taken to capture the issue, even as trivial as fielding
a development query from a third-party provider, has proven to be invaluable as it
affords the team a well-defined timeline and record of events. As visibility regarding the
operational environment has improved, it allows the operations management team a
clear view of the battlefield. Troops can be diverted to the most critical issues and items
which are not progressing increase in visibility with time.
In much the same way that the development team has a daily standup call to discuss
the tasks for the current sprint, the operations team also has a daily call. This has been
strategically scheduled just before the standup of the platform team as it allows any
items, which require more technical support, to be discussed with a larger audience.
Issues, outages, errors, and remediation activities from the previous 24-hours are
discussed in this session. With representation from the senior members of the team, this
provides insight into stability of the platform, guidance regarding handling of similar
circumstances in the future, decisions for the next steps to resolve outstanding items,
and an opportunity for the operations team to request additional assistance by way
of development support, time for further investigation, or escalation to persuade an
external dependency to respond.
A further objective of the daily session is to reciprocate the gift of visibility and
give the support team a view into upcoming releases across delivery streams. As the
development sprint nears completion, some elements may not be released due to delays
in testing or external dependencies. Keeping the support engineers updated of the
release schedule allows the team adequate time to prepare, potentially alert the delivery
leads of planned maintenance or potential stability issues of external systems which are
key to the release and more importantly, is a clear signal of appreciation and respect to
the operational team for keeping the platform running smoothly.
249
Chapter 10 API Operations
With a technically minded team, and an affinity for APIs, we have assimilated the
interfaces provided by the service desk software, and it has become one of the key
sources of data which is programmatically mined daily. In-flight issues in various
lifecycle phases are aggregated and displayed on a custom dashboard which is used
to quickly identify hotspots in the platform. For example, a high number of third-party
provider support requests reporting intermittent network issues could highlight a
problem with the firewall which can be addressed pro-actively. Historical items are also
of importance and are used for reporting to external stakeholders at periodic review
sessions as shown in Figures 10-16-1 and 10-16-2. These reports provide insight into the
stability of the platform, mean time to resolve issues, and traffic volumes which may be
used to motivate for funding for additional infrastructure and personnel for the platform.
It provides clear, unambiguous, and data-backed evidence regarding key support focus
areas to be addressed to afford the platform greater stability.
S
ervice-Level Agreements
Incidents are classified by support engineers in different categories based on the severity
and priority of the issue. The definition and the severity mapping follows the matrix
defined in Table 10-1.
S
upporting Systems
Our Platform has two major dependencies – one internal and the other external.
Internal components which are the assembly blocks of the Marketplace, discussed in the
chapter detailing our platform architecture. An issue with an internal component could
potentially result in the entire platform being rendered unavailable. External elements
are backend systems which are service providers for the API products. One or more API
products could be impacted based on the nature of the provider interface. In the sections
below, I discuss the internal and external supporting elements in more detail.
B
ackend Dependencies
As illustrated in Figure 10-18, an API Marketplace has a number of consumers, each
using one or more APIs, and an API integrates into one or more provider systems.
Working our way back up the tree, it can be observed that a failure of a single provider
could potentially impact one or more APIs with the ripple effect of impacting one or
more consumers.
252
Chapter 10 API Operations
Our approach to managing this complex network of consumers, APIs, and providers
is as follows:
• Have a clear view of which backend systems are providers for each
API product. This is a “living” view as each release might see new
connections between product and backend.
• From the nature of the API, determine the criticality of the backend.
As an example, if a security service provider is unavailable, it impacts
authentication, and users will not be able to sign in; if a reference
data provider is unavailable, cached data may be used temporarily.
• The API Gateway can be used to determine the API products that
consumers have subscribed to.
253
Chapter 10 API Operations
Summary
In this chapter, we delved deeper into different domains within our Operational
environment. From our experience of building and launching an API Platform, and
from observation of the large number of areas to consider, a key lesson to take away
is to have a view on operationalization early in the lifecycle of the platform. We also
highlighted our approach to change and release management, which has been tailored,
and importantly accommodated, to function in an already established organization.
Once again, a DevOps practice is seen as a key enabler which allows agile delivery to be
achieved consistently and reliably.
It is essential that running of an operations environment always be considered
from a people, process, and technology perspective. As much as this may sound to be
stereotypical, these elements are intrinsically intertwined, support each other, and result
in a far more efficient and reliable platform. The logging and monitoring approaches
discussed provide the technology capability and allow insight into solution execution.
The support team roles, empowerment, and communications strategies highlighted
show how the people element fits in. A well-defined process is key to a well-run,
predictable, and stable Marketplace.
Our Marketplace, and likely yours too, is dependent on many internal supporting
elements and backend service providers. Finally, we delved into our approach to
leveraging enterprise managed services and efficiently working with provider systems. In
all honesty, this chapter turned out to be longer and far more detailed than anticipated.
I attribute this to the vastness of the operational landscape and to the simple fact that a
solution will spend the greater part of its lifetime within an execution context.
254
CHAPTER 11
Conclusion
We are now in our fifth year of our API Marketplace implementation. It is remarkable
that the pace and energy of the platform is more vibrant and stronger today than it
has ever been. I honestly believe that the platform is now a living, breathing, almost
self-sustaining entity. As I glance at my to-do list, there are still several areas that I
have identified for optimization. One of the factors which this could be attributed to is
technology options that were previously not available. We are on a constant quest to
streamline performance and execution – possibly a perpetual one as new avenues and
approaches appear with each iteration of the platform. Another significant factor is that
backend product teams are now extremely keen to publish their service for external
consumption, and we have a growing list of APIs scheduled for delivery.
In all honesty, while writing this book, I have questioned the time that I could
have spent nurturing the platform. The reason which anchored me to the book was to
attempt to capture our formula for success by sharing my experience from the last four
years – to bootstrap other implementations. As indicated on a number of occasions, each
Marketplace implementation will be unique, tailored to the needs and identity of the
host organization. It is highly unlikely that the Marketplace you will build or are currently
building will adopt every concept or approach outlined – from Platform Architecture
to Operations. However, it is a fervent hope that while reading this book, the solutions
outlined will provide a foundation, catalyst, or trigger for innovations in your platform.
With the benefit of hindsight, and from keen observation of many recurring themes,
I am of the firm belief that there have been key ingredients to our formula that were
essential to the success of our implementation. Although many are not technical, they
are essential to the engineering spirit of this initiative.
255
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
Chapter 11 Conclusion
T eam Dynamic
In Chapter 1, I highlighted the key roles to pilot the Marketplace star ship into new
and unchartered territory. As much as these can be filled with talented individuals, it
is essential that the roles function as a single unit. With any long-term project, human
resource changes are inevitable. Ours has been no different and we have had several
changes, with just myself and one or two other team members, the only constants.
This has afforded me a unique vantage point to observe several permutations, some
successful, some not. The reason that our current configuration has been the most
successful can be simply attributed to a fantastic team dynamic and culture. The various
personalities, very much like the crew of Star Trek, complement and importantly balance
one another. There are many occasions when there are more differences in opinion than
universal agreement. Oddly enough, this is possibly the reason for a successful team
culture. By considering a number of perspectives through active, healthy discussion
and debate, we generally find the most balanced solution. Reciprocally, if everyone was
similar, the end result would be heavily weighted in a specific way.
In every discussion, all viewpoints are heard and considered. This can be attributed
to great facilitation by the ship’s captain. If consensus cannot be reached, the captain
adjudicates, taking all inputs into consideration. Although a team member’s solution
may not have been selected, they feel placated as they had the opportunity to share their
view. With a solution or target identified, all members of the team pull in that direction.
The whole is greater than the sum of its parts (Aristotle).
O
rganizational Support
I am also of the firm conviction that we would not have been able to sustain full
operational capability, let alone establish an API Marketplace, without a strong
enterprise service foundation. This was not always my view. In the early stages of
building the Minimum Viable Product (MVP), we viewed the rest of the enterprise
as an impediment to our success. The concept of third-party developers leveraging
organizational capability combined with our radical technology selection was years
ahead of standard practices. In hindsight and introspection, the petulant mindset and
impatience of our project team several years ago was relatively immature. Given that we
were attempting to build a new digital channel into the organization, we should have
proceeded with far more care and caution. The proximity of an API Marketplace at the
256
Chapter 11 Conclusion
outskirts of the traditional enterprise to bridge third-party access was most likely the
contributing factor for both the project team’s selection of bleeding-edge technology and
the organization’s cause for concern.
The mindset shift from annoyance to appreciation from the project team and
suspicion to trust from the rest of the organization occurred during the process of
operationalizing the platform. By leveraging enterprise capability, we inherited the
experience and expertise of seasoned veterans, which helped fast-track the maturity of
a platform from running under controlled laboratory conditions to reliably servicing
real-world workloads. By demonstrating more patience and resilience, we were also able
to evangelize the benefits that the capability and reach that an API Marketplace could
afford the greater organization and lobby support from various enterprise domains.
A key lesson that I have learnt, both personally and professionally, is that it takes far
more time and energy attempting to skirt around process and governance. Rather afford
the organization the necessary respect by learning how to navigate existing process and
more importantly, understanding its function and purpose. Odds are – you will discover
that it serves to protect the organization and its users. Once you have a firm grasp of the
process and function, then try to optimize for agility.
Seek first to understand.
A
gility to Pivot
There were a few occasions when our mission of establishing the platform faced
significant challenges, sometimes threatening the very existence of the initiative.
Standout examples include a key backend provider for our first API product withdrawing
at the last-minute due to regulatory requirements and a high-profile third-party
consumer likely to miss a key annual target due to trouble consuming a new API.
The speedboat operating model, discussed in Chapter 1, allowed the project to
pivot on a dime and change direction quickly. Interestingly, to mitigate the loss of the
key backend, a system of far less importance and visibility in the organization was
selected as a replacement as it provided similar, but lesser used functionality. At first,
the project team was disappointed that we were not launching with more fanfare that
the higher profile backend would have afforded. Over time, this fast changed to relief,
as we observed the challenges of supporting a live API and how ill-prepared we were to
transition from prototype to execution. In all honesty, had we launched with the higher-
profile API, we would not have had sufficient time to stabilize our operational platform.
257
Chapter 11 Conclusion
Apart from the learning that our APIs should be designed to be far simpler and the
need for active third-party developer engagement, the potential bombshell of missing
a key milestone date resulted in the creation of a new integration model. This allowed
the platform to absorb complexity where possible to fast-track API adoption. This
pattern has since become a cornerstone of our Marketplace and is actively used for
future product design. The silver lining from this encounter is that an API Marketplace
implementation is not strictly black-or-white. In true start-up mindset, the team and
platform should do everything possible to create and sustain third-party adoption. If that
means handing out T-shirts and mugs at developer meetups to spur interest or building
a user interface to support an API,
Do what needs to be done.
Developer Centricity
As discussed in the chapter on monetization, the key element powering the Marketplace
is the third-party developer. I can unreservedly say that everything exists for third-party
consumption. Although your Marketplace may have the widest range of API products
and built on a superb ground-breaking technology platform – without active third-party
participation, the initiative is lost.
APIs should be conceptualized and crafted with third-party needs, interest, and
aptitude in mind. Technical teams may become enamored with the cool factor and
bragging rights of integrating into a legacy mainframe using a morse-code protocol
developed by the founders of the Unix operating system. If the functionality it exposes is
of no interest or little use to consumers outside your organization, the effort is wasted.
Product owners have the unenviable task of bridging the digital divide between semi-
delusional backend providers who believe their legacy system has ground-breaking
capability and flighty third-party consumers looking to build the next killer-app.
The Sandbox concept, discussed in great detail, is a tool which can and must be used
to facilitate this interaction. It is not simply a mechanism to support third-party testing. It
can be used to gauge third-party interest and demand, shape an API definition and most
importantly as a buffer between super-agile external consumers and a more stoic, well-
governed, traditional enterprise ecosystem.
Finally, and possibly most importantly, the developer portal is your Marketplace
shopfront and represents the first interaction between a third party and your platform.
The next time you stand in front of a physical store or land on a new ecommerce portal,
258
Chapter 11 Conclusion
consider the decision-making process that would result in further engagement. With
that in mind, launch your developer portal and consider it from the perspective of a
third-party consumer. This should constantly and honestly be done by everyone in the
team, even friends, family, and colleagues from other teams to get as much feedback and
review as possible.
Engage your third-party community as quickly as possible to solicit feedback and
understand your market. The developers or third parties in your territory may need
assistance and support to use your platform. Be sure to keep this in mind.
The Developer is the center of your universe.
Where to Start
By now, the task of building an API Marketplace may seem to be incredibly difficult.
After all, you are establishing a new digital channel into your organization, and such
a capability needs to be underpinned by a planet-scale platform architecture. Not to
mention APIs which must be superbly designed, developed according to agile principles
with enterprise-level support.
At this point, I would like to share with you my number one coding principle:
Build simple and iteratively.
The principles, platform architectures, approaches to design, agile development,
and operational procedures shared throughout this book have evolved over years and
are still evolving. Our implementation started with a single API product to demonstrate
an MVP. If I had to do it over, I would drastically reduce even this humble scope. It
is possible, even advisable to start a sustainable API Marketplace with a handful of
API products. The products could serve a niche function, and the platform can most
certainly operate on a legacy architecture – as long as it is stable. Limit the number of
initial API products – I would suggest a maximum of two to start. Resist the temptation
of having a developer portal (shopfront) full of products. In the humble opinion of a
developer, having one fully functioning API is far more impressive than ten “coming
soon” indefinitely.
It is also easier to retrofit fewer products – for improved performance, monitoring,
and operational visibility. A key lesson throughout this book, and one I have learnt
through many years of integration experience, is that the interface serves to support the
greater solution. As long as it is stable, predictable, and reliable, consumers are not really
259
Chapter 11 Conclusion
concerned if it uses the power core harvested from an advanced alien spacecraft which
crashed to earth or archaic processes which were used to build the pyramids. Allow your
platform architecture to evolve over time – in line with the needs and requirements of
the Marketplace. Again, restraint is advised as this is an opportunity to use the latest and
shiniest technology.
Set a timeframe, possibly as short as three months, not longer than six, to publish
your first API and iterate from there.
Keep in Touch
In writing this book, I have drawn on years of experience, predominantly integration,
across a wide range of projects and contexts. One of the marvels of working in
technology is that there are many, possibly infinite ways to solve a problem. This is the
reason I can’t wait to open my notebook everyday as I get a new problem to solve – in
my way. I would be especially keen to learn of your API Marketplace journey and the
approaches that you and your team adopted to solve challenges – maybe in the same
way we did, maybe (and very possibly) in a completely different way. Please feel free
to stay in touch and let me know if you have any thoughts, suggestions, feedback, even
counter-arguments, or criticism to any of the content throughout the book.
I believe that we can only go forward if we share and work collaboratively. I look
forward to hearing from you.
260
Index
A Application Programming Interface (API)
aircraft carrier, 6, 7
Account Information Service
altruistic view, 1
Providers (AISP), 21
Amazon Echo devices, 2
Account Servicing Payment Service
banking benefits, 19
Provider (ASPSP), 21
banking industry (see Banking
Amazon Echo devices, 2
industry)
Application development
benefits, 12
administration, 197
coding principle, 259
authorization, 196
collaboration/sharing information, 3
development guidance, 190, 191
connectedness, 4
gateway product implementation,
counter-survival, 5
191, 192
delivery lead, 13
hosted applications, 197 democratizing technology, 3
lightweight, 192 developer centricity, 258, 259
microservices operation developer ecosystem, 11
architecture, 192–196 digital channel, 10, 11
client/server, 194 engineering lead (EL), 13
elements, 194 enterprise-wide impact, 8–10
integration, 194 Forensics teams, 8
logic components, 194 foundational elements, 1
logic orchestration, 195 human-readable, 3
middleware component, 193 information security, 8
platform services, 196 integration pattern, 7
portal applications, 196, 197 interface, 3
principles, 191 Krypton, 9
rate limiting, 192 lab environment, 10
security, 192 manifesto concepts, 5
third-party onboarding, 196 operational platform, 12
well-defined requests, 191 operations lead (OL), 14
Application Performance pivot, 257, 258
Monitoring (APM), 238, 239 product owner (PO), 12, 14
261
© Rennay Dorasamy 2022
R. Dorasamy, API Marketplace Engineering, [Link]
INDEX
262
INDEX
capability, 61 product/service, 47
code snippets, 61 release notes, 53
education, 62 status page, 52
fiddler, 62 transparency, 52, 53
mandatory elements, 62 trust, 51, 52
neutrality, 60 user groups/community
postman, 60–62 sessions, 49
sharing, 61 toolings, 59
variables and environments, 62 User Experience (UX), 38
Commercial-Off-The-Shelf (COTS), 219 Continuous Delivery (CD), 187
Commercial proposition, see Continuous integration (CI), 186, 187
Monetization
Consumption
advocacy, 54, 55 D
business (see Business development) Demilitarized Zone (DMZ), 113
business/technical personas, 38 Design Strategies
client URL (see Client URL (cURL)) access mechanisms, 158, 159
ecosystem, 57, 58 availability, 155
engagements, 58, 59 bottom up, 149, 150
interactions, 56 build your own strategy, 152, 153
internal and external developers, 55 business rules, 155
Marketplace vs. internal APIs, 37, 38 compliance requirements, 148
personas, 38, 39 consideration, 153
support, 55–57 consumer-driven approach, 152–154
technical-developer portal definition, 148
attract, 49 documentation, 156
beta program, 52 enterprise architecture (EA), 157
blog posts and podcasts, 50 error handling, 168, 169
blueprints, 50 filtering/pagination, 169
collaborate, 53 governance, 157, 158
developer certification, 50 guidelines, 168
educate, 50, 51 integration approach, 151–153
hackathons, 49 lifecycle
impact assessment, 49 design process, 164
instructions/code, 48 developer experience, 165
lead/product owner (PO), 54 end of life, 167, 168
messaging channels, 48 versioning, 166
patterns, 50 maintainability/onboarding, 155
263
INDEX
264
INDEX
265
INDEX
266
INDEX
267
INDEX
268
INDEX
269
API security practices such as OAuth frameworks and consent-based access mitigate risks by requiring authentication and authorization before accessing sensitive data. Open Banking uses secure access mechanisms like tokens and client credentials to ensure that only authorized parties access financial data. Additionally, ensuring data privacy and integrity through layered security protocols helps prevent unauthorized access and breaches. These practices are paramount as APIs expose banks to new attack vectors, making comprehensive security strategies vital to protect customer data and maintain trust .
Challenges of on-premises infrastructure, such as maintenance complexity and scalability limitations, drive the adoption of cloud-based solutions for API platforms. Cloud infrastructures offer scalability, allowing platforms to adjust resources according to demand. They ease management burdens and provide robust support for high-traffic environments, facilitating rapid deployment and iteration. These benefits make cloud-based solutions appealing as they align with the need for agile and scalable API frameworks, particularly as API Marketplace demands grow .
API Marketplaces face challenges such as complexity and lack of appeal in attracting and retaining third-party developers. To overcome these, marketplaces need to offer easy-to-consume APIs that abstract backend complexities. They should focus on user experience, providing clear documentation and support to engage developers effectively. Marketplace success depends on the ability to educate potential users about platform benefits and build trust through transparency and reliability. Actively marketing capabilities and ensuring a user-friendly interface are also vital. Without these, developers may bypass less appealing marketplaces, opting for those offering a better ecosystem .
Different regions have adopted various regulatory approaches to Open Banking. For example, the UK has taken a prescriptive regulatory approach by requiring major banks to develop Open APIs, overseen by the Open Banking Implementation Entity (OBIE). The European Union's PSD2 directive has a similar mandate. Other regions, like Bahrain, use guidelines based on PSD2 to ensure consistent implementation. In contrast, regions such as the USA and South Africa follow a market-driven approach, allowing voluntary participation without formal regulatory requirements. These different strategies impact implementation timelines, with prescriptive approaches generally leading to faster and more uniform adoption, whereas market-driven ones can result in varied adoption rates and inconsistencies .
APIs are crucial in transitioning from Open Banking to Open Finance by enabling standardized and secure data sharing beyond traditional banking. While Open Banking focuses on transactional data and payments, Open Finance encompasses a wide array of financial services like savings, investments, and insurance. This transition empowers consumers to share data across various sectors, fostering broader innovation in financial products and services. APIs facilitate this by providing consistent data access structures, encouraging product development and competition .
Microservices architecture contributes to scalability and flexibility by enabling financial platforms to develop and deploy services independently. This modular approach allows teams to iterate quickly, implementing changes and scaling specific services as needed without affecting others. In the context of APIs, this architecture supports diverse and evolving user requirements, facilitating innovation through simpler integration routes. The use of microservices enhances control over each service, optimizing their deployment and adaptability to market demands .
A market-driven approach to Open Banking, as seen in South Africa and the USA, implies that participation is voluntary and not regulated strictly by mandates. This approach allows flexibility and innovation but can lead to inconsistent adoption and fragmentation as institutions have no obligation to provide APIs. Consequently, this can slow down the penetration of Open Banking services and limit consumer choice and competition compared to regulated regions. Over time, this approach might necessitate adjustments to foster wider adoption and ensure consumer protection .
Open Banking can promote financial inclusion by providing access to financial services for underserved populations. Through standardized and secure API access, various stakeholders, including fintech companies, can develop diverse services tailored to different customer needs, such as personalized investment products or credit scoring for underbanked individuals. This inclusivity can lead to broader financial participation, supporting overall economic stability. Moreover, Open Banking enhances financial stability by securing sensitive data sharing and preserving customer confidence in the financial ecosystem .
User experience (UX) is crucial in an API Marketplace because it significantly affects adoption rates and developer engagement. Despite its technical nature, an API Marketplace must appeal to and be accessible for different personas, including business users, not just technical developers. Good UX ensures that users understand the platform's capabilities and how it can provide business value. Without a focus on UX, a marketplace risks alienating potential users who may find it too complex or cumbersome, thereby reducing its effectiveness and reach .
Open APIs in the context of Open Banking allow third-party providers to access financial information, leading to greater competition and innovation. Open APIs enable new entrants to offer innovative services, enhancing customer experience and providing diverse service offerings. By facilitating secure and standardized access to data, open APIs help to level the playing field, allowing smaller firms to compete and innovate without needing significant infrastructure investment. However, if APIs are controlled by banks, they could inhibit innovation by playing a gatekeeper role .









