VOOZH about

URL: https://thenewstack.io/how-to-build-an-api-centric-digital-architecture/

⇱ How to Build an API-Centric Digital Architecture - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-01-02 08:00:50
How to Build an API-Centric Digital Architecture
sponsor-wso2,sponsored-post-contributed,
API Management / Software Development

How to Build an API-Centric Digital Architecture

Jan 2nd, 2023 8:00am by Srinath Perera
👁 Featued image for: How to Build an API-Centric Digital Architecture
Feature image via Pixabay
WSO2 sponsored this post.

This is the first of a two-part series.

Just like with species, the ability to quickly evolve is a key competitive advantage for a digital enterprise. An API-centric approach is a key enabler for agility. In this post, we discuss a typical API-driven architecture, how it can be deployed, and the right tools for the job.

Being agile enables digital enterprises to go to market faster and respond to changes quickly. For example, when developing a product, there is often limited understanding of end user needs. Reducing this risk is not only hard but also expensive; it can involve market research, beta users and expert input. An agile organization can leverage an API-driven approach to obtain a reasonable approximation, learn from users and evolve the system into what users really need.

But, what are some best practices to get it right the first time?

Founded in 2005, WSO2 enables the composable enterprise. Our open source, API-first, and decentralized approach helps developers and architects to be more productive and rapidly build digital products to meet demand.
Learn More
The latest from WSO2

A Sample Architecture 

The following diagram shows how to arrange internal capabilities as APIs and create a digital business by combining and creating new and existing APIs. This is not the only way to do this; however, it is representative of common techniques and ideas.

👁 Image

This architecture breaks the code into two layers: a core API (capability) layer and an experience layer (application layer). The core API layer represents the organization’s capabilities as APIs (aka core APIs).

The experience layer is what end-user applications use directly. These can be websites, mobile apps and APIs exposed to the end user applications and helper services, such as backend for frontend (BFF) services. They reuse core APIs and external SaaS APIs from the API economy.

The experience layer creates value by combining new APIs. APIs in this layer can be consumed by end users or web or mobile apps. This layer can also include event-driven integrations (logic that connects systems, data and APIs together), which are triggered by events happening in the world or events happening in the system.

In a well-designed architecture, the core API layer should evolve slowly and is built by experienced developers employing sophisticated techniques. In contrast, experience layers evolve fast in response to user requests. The goal of this layer is to compose the API from the core API layer and public SaaS APIs and deliver user experiences. This layer requires close collaboration with domain experts and product managers. Accelerating go-to-market and the ability to change while learning from users are critical (growth hacking).

Why does the experience layer evolve faster than the core API layer?

When we need to make a change or add a new experience (UI modifications), some can be handled by reusing APIs without changing them. However, some experience layers will need API changes. A good design aims to keep APIs stable with minimum changes and reduce the need for applications to wait for core API changes. So, the core API layer will change more slowly than the experience layer. The better the API design, the slower the core API layer will change.

Services running in experience and core API layers need several helper technologies. The first is that they need to support user identity and access control, which is supported by customer identity and access management (CIAM) technologies. Second, they need API management (APIM) to expose their services as APIs, handle their subscriptions, throttling and other quality of service (QoS) characteristics and provide support for developers who will use those APIs (typically via a developer portal and sometimes through a marketplace as well).

It is possible to build or assemble both CIAM and APIM using libraries and code, but often the attention, time and money spent building those are wasted, taking you away from your core goals.

It’s not enough to just get the system to production, we need to keep our system running and support it. To do this, we need DevOps and troubleshooting support.

DevOps includes a code repository and a CI/CD pipeline to build and deploy changes and multiple environments (typically dev, staging and production) to test and gradually roll out the code. Some deployments have support for canaries and blue-green deployments to support the gradual rollout and provide an immediate fallback when a problem occurs.

Troubleshooting is a set of tools that helps the support team isolate and fix any problems. At a minimum, this must include observability tools, log management and support to collect data from a running system.

Building an API-Centric Digital Architecture 

We need to decide where we can run the system, how we are going to implement the services and how we are going to expose, manage and govern relevant services as APIs. What you run is a service. Some of those services you may choose to expose as APIs using an API management solution. We can identify two types of services based on their capabilities: business logic services and data services.

Data services are built with wizards or using a programming language, such as Java, Go or Ballerina. Based on the features required, you may choose GraphQL or OData or pure JSON with HTTP. Often, wizards or a low code/no code experience let users explore the database using SQL or other queries and map the results into messages.

Most business logic services would modify a database, retrieve data and run some business logic before responding. They’re often built with languages such as Java (+Spring Boot), Go (go-kit), and Ballerina, which are strongly typed, have solid concurrency models, and are fast.

A notable exception from the above languages is that when the API exposes a machine learning model, users may choose the Python flask framework or TensorFlow Serving.

The services in the core API layer are often written by experienced developers. Those services can run on top of on-premises hardware, in the cloud or on top of a serverless platform. The serverless option can be cost-prohibitive for heavy loads.

Services in the core API layer often need to connect to existing databases, systems or other services in the same layer. They communicate with HTTP, gRPC and sometimes message protocols such as AMQP or Kafka.

Services in the core API layer can be directly used by the experience layer as is or as APIs. If they are exposed as APIs, typically an API management solution (on-premises or provided by a cloud provider) is used.

The experience layer includes APIs, services (such as BFF services or end-user APIs), integrations and also web apps or mobile apps. These applications and services compose other core API layer APIs, services or SaaS APIs. Since the experience layer often focuses on the composition of APIs, it’s mainly built on a connector ecosystem and data mapping capabilities: connectors provide easy-to-use clients to talk to core APIs, services, and SaaS APIs, and data mapping lets us translate between different message formats.

A typical composition API will receive a message directly or through an event, invoke several APIs and translate data between those APIs. The experience layer is often implemented using an Integration Platform as a Service (iPaaS) in the cloud, an on-premise integration tool or using a programming language like Ballerina or Python, or code running serverless. Most of these choices have a connector ecosystem and support data mapping.

Low-code technology used for writing integration (server-side code) is a good choice for the experience layer as it enables rapid development, involvement of domain experts and a wider workforce.

Most services in the experience layer are typically exposed as APIs. If you choose an iPaaS or a cloud platform (such as Azure functions) for deployments, each provides APIM support, observability, log management and sometimes CIAM support. Typically, solutions provided by non-cloud providers tend to be deeper in their features, but you should choose based on your requirements. A few noteworthy APIM solutions include WSO2 API Manager, Apigee or MuleSoft.

Most public APIs, mobile applications or websites provided by the experience layer need to support end-user management, authentication and authorization, which we should solve with a CIAM solution. You can choose between both on-premises or SaaS CIAM solutions such as WSO2 Asgardeo, Okta, and Auth0.

Instead of directly building from scratch or building on top of a cloud provider at the Infrastructure as a Service ( IaaS) level, you can choose to build on top of an internal developer platform like Choreo, which integrates all the above aspects. However, a platform must take an opinionated approach to design decisions and reduce your choices and flexibility, in return for simplicity and more agility.

Founded in 2005, WSO2 enables the composable enterprise. Our open source, API-first, and decentralized approach helps developers and architects to be more productive and rapidly build digital products to meet demand.
Learn More
The latest from WSO2
TRENDING STORIES
Srinath Perera is the chief architect at WSO2. He is a scientist, author, software architect and programmer who works on distributed systems. He is a member of the Apache Software Foundation and a key architect behind several widely used projects...
Read more from Srinath Perera
WSO2 sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.