The OPC UA Web API is a new, REST-compatible interface available since OPC UA version 1.05.04. It is provided as a complete OpenAPI specification. The OPC Foundation offers a web-based OPC UA server along with a corresponding API definition page.
The Web API maps the traditional OPC UA service model to common web technologies by using HTTP and WebSocket calls with JSON payloads and standardized HTTP authentication.
Its main purpose is to make existing OPC UA servers web-accessible, allowing browser or cloud applications to access OPC UA data sources without the need for proprietary SDKs.
Access is simplified to basic HTTP requests, which significantly reduces the complexity for web clients compared to binary access via the TCP protocol. This allows OPC UA values to be retrieved and integrated into other applications with simple calls.
Table of Contents
Advantages
The key advantage of the OPC UA Web API is that it eliminates the need for binary protocols, which are difficult to integrate into web applications. Instead, access via standard protocols such as HTTP/REST enables simple and platform-independent integration.
The Web API is particularly well-suited for web applications that rely on standard technologies and do not require extremely high-performance mass communication.
General information about APIs can be found here: What is an API?
Integration via REST
The API is accessed via traditional HTTP calls. Through defined endpoints (API definition), various functions of an OPC UA server can be specifically addressed. Data is exchanged in a human-readable JSON format, which simplifies integration into a wide range of systems and platforms.
Simple Functions, Readable Results
The functions used to retrieve data are clearly defined and easy to understand. The simplest operations are reading and writing. As is typical with OPC UA, writing enables bidirectional data exchange.
The result is returned as readable JSON, which can then be processed by the client. Here is an example of a response to a “read” request.
{
“ResponseHeader”: {
“Timestamp”: “2025-05-19T07:53:27.7067381Z”,
“RequestHandle”: 2
},
“Results”: [
{
“UaType”: 11,
“Value”: 26.33,
“SourceTimestamp”: “2025-05-19T04:28:20.6321852Z”
},
{
“UaType”: 11,
“Value”: 104.11,
“SourceTimestamp”: “2025-05-19T04:28:20.6326211Z”
}
]
}
Implementation
Creating a client for an OPC UA Web API server is very straightforward. In principle, a simple REST call via HTTP is sufficient. There are also generators available for various programming languages that can convert the OpenAPI specification into client code.
On the server side, things are a bit more complex. Implementation of the API by an OPC UA server vendor will depend on the vendor’s development and release schedule. In principle, a proxy – essentially a converter from OPC UA to OPC UA Web API – could also be a viable solution.
Use case with manubes
manubes users can utilize the REST Edge Connector to connect to an OPC UA Server through the Web API.
In our example, we use the public OPC UA demo server provided by the OPC Foundation. Using the Web API’s “read” method, we cyclically read two data points and store them in the manubes TimeSeries Storage.
Displaying values
The recorded values are visualized using the TimeSeries view in manubes. This quickly provides transparency regarding the transmitted OPC UA data and its progression over time.
Conclusion
Since the OPC UA Web API is still very new, many use cases are currently still emerging. However, due to its use of standard web technologies, a wide range of clients – from browsers to cloud services – will be able to easily read and process OPC UA data.
The OPC UA Web API combines robust OPC UA technology with modern web standards, without requiring developers to master the complex OPC UA binary protocol.
Production optimization with manubes
With manubes, manufacturers are able to rapidly develop their own solutions in areas such as production planning, process control and asset monitoring.
The innovative AI Assistant transforms production data into operative insights.
Recent Comments