Home/Blog/Architecture

Industrial API Gateway Architecture: Connecting Legacy PLCs to Cloud Platforms

The five components of the software layer that turns point-to-point PLC integrations into a maintainable API — not a buying guide for gateway hardware.

Architecture10 Nov 20267 min read
Abstract visualization of an industrial API gateway connecting factory floor machinery to server racks and cloud infrastructure with glowing data lines
TL;DR

An industrial API gateway is the software layer that translates OT protocols from legacy PLCs and sensors into REST or GraphQL endpoints that cloud and ERP systems can actually consume. It needs five components — protocol translation, a device registry, OT-aware auth, schema versioning, and store-and-forward buffering. Most plants are better off building one than buying hardware alone once they have more than a handful of integration consumers.

Most plant-floor integration still happens one wire at a time: a custom driver for the dashboard, another for the ERP connector, a third for the partner's analytics platform, each one talking directly to a PLC that was commissioned before REST APIs existed. That works until the fourth consumer shows up, and then every new system means another bespoke integration to build, document, and keep alive through the next firmware update.

An API gateway is the architectural answer to that sprawl, but it's worth being precise about what the term means here. It's not the physical IoT-gateway hardware that dominates most vendor marketing — protocol choices like MQTT and Sparkplug B, which we cover in our guide to MQTT and Sparkplug B for industrial IoT, already handle a lot of that transport layer. An API gateway is the software layer that sits above the transport, turning whatever protocol a device speaks into a consistent, versioned interface that application developers can build against without ever touching a PLC directly.

This guide covers what that software layer actually consists of, why legacy PLCs need it before they can talk to anything cloud-based, the security considerations specific to exposing OT data, when it makes sense to build one instead of buying an off-the-shelf product, and a practical path for migrating off point-to-point integrations.

What Is an Industrial API Gateway (and What It Isn't)

An industrial API gateway is a software layer that sits between OT protocols — Modbus, OPC UA, MQTT — and IT or cloud consumers: ERP systems, dashboards, partner APIs, and analytics platforms. It can run on an edge device, in a local data center, or in the cloud; the deployment location is a separate decision from the architecture itself.

It's easy to confuse this with the physical IoT-gateway boxes that most hardware vendors sell, and the confusion matters because the two solve different problems. A hardware gateway terminates a protocol at the edge and forwards data upstream. An API gateway is what turns that forwarded data into something a web developer can call without learning Modbus register maps — and it can run on top of a hardware gateway just as easily as it can run as a standalone service.

Why Legacy PLCs Need an API Layer Before They Can Talk to the Cloud

PLCs installed ten or twenty years ago were built to control a process, not to serve data to a REST client. They speak register-based or proprietary protocols that assume a dedicated point-to-point link to a known consumer, not an open API that any authorized application can query. Without a translation layer in between, every new consumer means another custom driver written against that PLC's native protocol — and every one of those drivers is a separate thing to maintain when the PLC's firmware or wiring changes.

That point-to-point sprawl is the real cost. Two or three integrations are manageable by hand. Once a plant has a dashboard, an ERP connector, a condition-monitoring tool, and a partner API all reading from the same PLCs, the number of brittle, undocumented connections tends to outpace anyone's ability to track them.

Core Components of an Industrial API Gateway Architecture

Five components do most of the work, and skipping any one of them tends to show up later as a production incident rather than a design review comment.

Protocol Translation Layer

This is the component that speaks Modbus, OPC UA, and MQTT on one side and exposes REST or GraphQL on the other. It owns the mapping between a PLC register or OPC UA node and a named field in the API response, and it's where most of the integration-specific code lives.

Device Registry and Digital Twin Mapping

A registry tracks which physical assets exist, what protocol and address each one uses, and how its tags map to API fields. Without a registry, that mapping tends to live in scattered configuration files or, worse, in someone's memory — and it breaks the moment that person is unavailable during an incident.

Authentication, Authorization and Rate Limiting for OT Traffic

Standard web-API auth patterns assume a reliable, low-latency connection, which plant-floor networks often don't have. OT-aware auth means tolerating intermittent connectivity gracefully — caching tokens longer, retrying without locking out a device after a network blip — while still enforcing least-privilege scopes per consumer, so a read-only dashboard integration can't accidentally write a setpoint to a PLC.

Data Normalization and Schema Versioning

A PLC program change or firmware update can silently alter what a tag means or how it's formatted. Schema versioning lets the gateway publish a new version of an endpoint while keeping the old one available to consumers that haven't migrated yet, so a firmware update on one machine doesn't break every downstream dashboard at once.

Caching and Buffering for Intermittent Connectivity

Plant-floor networks drop. A store-and-forward buffer queues data locally when the upstream link is down and replays it once connectivity returns, so a dashboard doesn't show a gap — and more importantly, so an ERP system doesn't miss a production event it needed to record.

Security Considerations for Exposing OT Data via API

Exposing OT data through any API widens the plant's attack surface, so the usual IT security playbook needs adapting rather than copying wholesale. Network segmentation between the IT and OT zones should stay in place even after the gateway is built — the gateway is the controlled crossing point, not a reason to remove the boundary. Least-privilege API scopes limit each consumer to exactly the data and operations it needs, and audit logging on every API call gives plant security teams a record to investigate if something looks wrong. IEC 62443, the standard for industrial automation and control systems security, is the relevant reference framework for this layer. For protocol-specific hardening on the OPC UA side of the gateway, see our OPC UA security best practices guide.

Build vs. Buy: When a Custom API Gateway Makes Sense

The decision usually comes down to three questions: how many distinct consumer systems need to connect, how unusual the plant's mix of PLCs and SCADA systems is, and whether an off-the-shelf iPaaS or gateway product already supports the protocols in use. A plant with two or three well-documented integrations and a common PLC mix can often get by with a packaged product. A plant with a long tail of legacy protocols, custom consumers, and a growing list of integration requests tends to outgrow what a generic product covers.

For that second case, a purpose-built translation layer that's designed around the plant's actual device mix — rather than forced into a vendor's assumptions — is exactly the kind of device-to-cloud API layer a specialized development team builds for clients who can't wait for a platform vendor's roadmap. The tradeoff is ongoing ownership: a custom gateway needs the same maintenance discipline as any other production software, including schema versioning and monitoring, not just an initial build.

A Practical Migration Path: From Point-to-Point Integrations to a Unified Gateway

  1. Inventory existing integrations. List every point-to-point connection currently reading from or writing to a PLC, including the ones nobody remembers building.
  2. Pick the translation layer. Choose or build the component that speaks the plant's actual protocol mix — Modbus, OPC UA, MQTT — and exposes it consistently.
  3. Stand up the device registry. Map every asset and tag before migrating a single consumer, so the registry is accurate from day one rather than backfilled under pressure.
  4. Migrate one consumer at a time. Point the least risky integration — often an internal dashboard — at the new gateway first, including migrating the ERP/MES link once the pattern is proven, and validate it against the old connection before cutting over.
  5. Decommission the legacy point-to-point link only after the new path has run cleanly for a full production cycle.
  6. Monitor the gateway as a production system, with the same alerting and on-call ownership as any other critical plant software, not as a one-time integration project.

Common Pitfalls When Building Industrial API Gateways

FAQ

What's the difference between an IoT gateway and an API gateway in an industrial context?
An IoT gateway is usually a physical or virtual box that terminates OT protocols at the edge and forwards raw or lightly processed data upstream. An API gateway is the software layer above it that exposes that data (and accepts commands) through versioned, authenticated endpoints that applications actually consume. A deployment can run both: the IoT gateway handles protocol termination, and the API gateway handles everything an application developer needs to integrate safely.
Can an industrial API gateway run entirely on-premises, or does it need the cloud?
It can run entirely on-premises. Plants with strict data-residency rules or unreliable WAN links often deploy the gateway at the edge or in a local data center, with only aggregated or event-based data flowing out to the cloud. The architecture doesn't require a cloud component — it requires a clear boundary between OT protocols and the consumers that need the data, wherever those consumers live.
How do you handle a PLC that only speaks a proprietary protocol?
Most proprietary PLC protocols still have either a vendor-supplied driver or a well-documented community library that a protocol translation layer can wrap. Where neither exists, teams typically add a small adapter service dedicated to that one PLC family, isolating the proprietary logic so it doesn't leak into the rest of the gateway's codebase. Replacing the PLC is rarely the first option, since the gateway's job is to make old and new hardware interoperable, not to force a hardware refresh.
What happens to the API gateway when a PLC firmware update changes the tag map?
If schema versioning is in place, the gateway can publish a new version of the affected endpoint while keeping the old one live for consumers that haven't migrated yet. Without versioning, a changed tag map typically breaks every downstream consumer silently, since they keep reading a field that no longer means what it used to. This is why schema versioning is treated as a core component rather than an optional add-on.
Is REST or GraphQL better for an industrial API layer?
REST is the more common choice for simple, well-defined resources like device status or a single sensor reading, and it's easier for OT-adjacent teams to debug with standard tooling. GraphQL earns its complexity when consumers need to combine data from many different devices or systems in a single query — a dashboard pulling from dozens of assets, for example — without the gateway having to build a custom endpoint for every combination.
How long does it typically take to migrate from point-to-point integrations to a gateway?
A single-consumer pilot, once the protocol translation layer and device registry are in place, commonly takes a few weeks. Migrating a full plant's worth of point-to-point integrations — inventorying them, prioritizing by risk, and decommissioning the old links one at a time — is usually a multi-month effort, since each migrated consumer needs its own validation before the legacy link is retired.
Does an API gateway replace the need for OPC UA?
No. OPC UA is a protocol for exchanging data between industrial systems, and an API gateway often uses OPC UA as one of its upstream connections to PLCs and SCADA systems, a standard maintained by the OPC Foundation. The gateway's job is to translate OPC UA (and other OT protocols) into the REST or GraphQL interfaces that web and cloud applications expect — it sits downstream of OPC UA, not in place of it.
Abstract network diagram of data flowing from industrial sensors through a central translation hub to cloud servers

Getting the protocol translation and device registry right is most of the engineering effort. For a closer look at how that fits into a plant's wider integration map, see our MES-ERP integration guide, since the ERP link is often one of the first consumers migrated onto a new gateway.

Designing an API gateway to connect legacy PLCs to cloud and ERP systems? Discuss Custom API Development →

← Back to Blog Editorial Team · Smart Machines & Factories