azyware
Modernization, ERP/CRM & implementationTechnique / practice

API layer over a monolith

Also: anti-corruption layer, legacy API facade

In one sentence

What is API layer over a monolith?

An API layer over a monolith is a service that exposes a legacy system's data and functions through clean, documented endpoints, so new apps and AI agents can use it without touching its internals.

What API layer over a monolith means

Most legacy systems were built for one interface: a desktop client or a server-rendered web app. Their logic lives in screens, stored procedures and batch jobs, not in reusable services. An API layer sits in front of that system and presents a coherent, versioned interface, typically REST or GraphQL, with authentication, validation and rate limits. Behind the facade it may call the monolith's own code, query its database read-only, or drive its existing endpoints.

The layer does two jobs. It lets new channels, such as a mobile app, a partner integration or an AI agent, work with the system immediately. And it draws a boundary that later modernization can exploit: once every consumer talks to the API, the implementation behind it can be swapped one endpoint at a time using the strangler pattern.

It is not a thin proxy that exposes database tables as JSON. That leaks the legacy model into every new consumer. A good API layer translates legacy concepts into the domain language you want to keep, which is why it is sometimes called an anti-corruption layer.

Who it really matters to

  • CTO / Head of Engineering: it unblocks new product work on the old system within weeks, rather than after a multi-year migration.
  • Product manager: mobile, partner and AI features can be scoped against a stable API instead of against undocumented screens.
  • CISO: every external access goes through one authenticated, logged entry point rather than direct database connections.
  • Data lead: the layer becomes the sanctioned way to read legacy data for analytics and retrieval, with access control applied consistently.

Why it exists

Businesses want AI agents, mobile apps and partner integrations on top of systems that were never designed to be called by anything. Direct database access is fast to set up and disastrous to maintain: schema changes break consumers, and there is no place to enforce permissions or audit reads. The API layer exists to give the monolith a modern front door and to create the seam along which it can be modernized. The trade-off is an extra hop and a piece of software to own, plus the discipline to route all consumers through it rather than allowing exceptions.

Where it is applied

  • Exposing loan, customer and document endpoints from an NBFC's core system so a KYC processing agent can update files under policy control.
  • Giving a university's mobile app access to timetables, fees and results held in a legacy ERP.
  • Letting a retailer's WhatsApp commerce channel check stock and place orders against a desktop-era inventory system.
  • Wrapping a hospital information system so a voice agent can book appointments without direct database writes.
  • Publishing tracking and proof-of-delivery endpoints from a logistics firm's TMS to customer portals.

Is API layer over a monolith a skill?

Technique / practiceAn architectural approach delivered as software. Eazyware builds it under API Development & Integrations and as the first phase of most modernization work, with OpenAPI specs, authentication and audit logging included.

Eazyware service that covers it: API Development & Integrations. Starting prices are on the pricing page.

Frequently asked questions

Should the API layer read the legacy database directly?

Read-only access is acceptable as a starting point if it is wrapped in the layer's own models. Writes should go through the monolith's own logic where possible, because bypassing it skips validation and side effects that the business depends on.

How long does an API layer take to build?

A first useful version covering the handful of entities a new channel needs usually takes a few weeks. Full coverage grows with each modernization phase; you do not need every endpoint before the first consumer goes live.

Related reading

Need API layer over a monolith built, not just explained?

PRJECT IN MIND?