Don't Sleep on Web Services: How RESTful APIs Improve Integration

5 min read

Mar 13, 2025 2:00:00 PM

Each year, National Napping Day recognizes our need for rest the day following the return of daylight saving time, when many of us shift our clocks forward one hour. If you are one of the many who "sprang forward" this past Sunday, we hope you have been able to catch up on your rest over the past several days. Today, however, we’re going to talk about a different kind of "REST" and how it can help you spring forward in your OT/IT integration goals and Industry 4.0 initiatives.

From Canary to AVEVA CONNECT, many technologies include a RESTful interface that can be leveraged when other avenues are unavailable. In this blog, you’ll learn how you can take advantage of RESTful APIs to easily integrate systems that do not have a native way to interact with each other, resulting in a standardized, scalable, and secure way to exchange data between enterprise IT systems and industrial OT environments.

What is REST?

RESTful APIs are interfaces that follow the REpresentational State Transfer (REST) design practices. These services/resources are exposed over a set of endpoints that can receive HTTP(s) requests from REST clients. Each API resource often has clear instructions on proper consumption and what it will respond with, but in general, REST APIs provide support for CREATE, READ, UPDATE, and DELETE (CRUD) operations for data processing on a targeted infrastructure/service.

RESTful APIs typically format request and response data as JSON payloads, which has the flexibility to structure data in intuitive ways.

For further details, I recommend taking a look at our blog post Let's Take a REST...API and Integrate a Wide Variety of Data.

Why choose REST?

The REST architectural style operates on six key principles that make it an effective tool:

REST principles

1. Client-Server Architecture

The system is divided into clients that request data and servers that provide data. This separation of user interface from data storage means REST clients only handle information that is relevant to them, improving scalability and allowing clients and servers to evolve independently.

2. Statelessness

Each client request is independent from each other and must contain all the necessary information for the server to process it. The server does not store client session state between requests, increasing scalability and reducing the risk of server overload. 

3. Cacheability

API responses specify whether the data can be cached and for how long, improving performance, reducing server load, and enhancing user experience. By allowing data to be defined as cacheable, less time and resources are wasted on requests for data that is not expected to change.

4. Uniform Interface

REST APIs provide a consistent and standardized way of interacting with resources through HTTP methods. They have pre-defined structures in both the exposed endpoints and the request/response payload, ensuring consistent and predictable behavior.

5. Layered System

The API can support multiple layers without the client needing to know the internal structure, making the system more secure and scalable. Since clients only interact with the API, any number of devices and technologies can be included in the RESTful service without sacrificing compatibility. 

6. Code on Demand (Optional)

Servers can send code to clients for execution, extending their functionality and allowing the processing burden to be shared between front end and back end. While optional, this can improve flexibility and reduce processing load on the client side.

Leveraging REST with OPC Router

OPC Router's ability to function as both a REST client and server allows data to be pushed and pulled from many sources and destinations. Its ETL (Extract, Transform, Load) tools allow you to take advantage of the innate flexibility of REST interfaces without needing to know how to code. JSON payloads examples, typically provided by the API documentation, can be pasted right in the configuration object to extract the values you need with little effort.

OPC Router JSON

This gives you the power to communicate with resources such as AVEVA CONNECT’s OMF interface and Canary Historian to both push and pull data through a variety of interfaces: OPC UA, MQTT, Relational Databases (SQL), Influx DB, and many more.

OPC Router JSON Read

 

As seen live on Stage at Prove It!

Step 5: Vision AI Hard Hat Detection incl. Systems Test

When the results are received from Google Cloud AI vision, another function block unpacks the results, uses standard function blocks to decide if the operator is wearing a hat or not and their mood, and delivers that data back to the UNS via MQTT. The PLC has a stack light connected to its I/O that indicates line status. When the AI model indicates that a safety requirement has been breached, data written to the TOP Server via OPC from Cogent DataHub that is acting as the MQTT to OPC gateway, will stop the line and update the stack lite. 

For the full demo, check out this blog » 

How Can REST Help You?

When it comes to OT/IT integration, RESTful APIs are a toolset that allows one to easily integrate systems that do not have native ways to interact with each other. With our decades of experience, Software Toolbox has had thousands of conversations with OT and IT professionals that are in the midst of the Industry 4.0 revolution, and REST APIs are not only critical to the integration of multiple industrial layers, but also to solve the challenges that modernization brings to one’s Digital Transformation goals.

Pair that with OPC Router’s rich connectivity and ETL features, and you've got yourself a powerful setup that is easy to manage and quick to implement – providing you time and ease of mind to focus on much more complex and time-consuming problems you might face.

If you are ready to start exploring how OPC Router can help your IT/OT interconnectivity, you can download a free trial here.

Our solutions consultants are also available to work with you and discuss your project aims— just reach out reach out here or give us a call at (704) 849-2773 during our business hours (8 AM - 5 PM US Eastern Time). Also, don't forget to subscribe to our blog for more interesting details on industrial automation tools and technologies!

Nicole Knox
Written by Nicole Knox

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback is always welcomed

Subscribe to our Blog

Posts by Topic

See all