Read

A page that uses JSON, JavaScript and HTTP to read data from an OPC UA server.

This page uses JavaScript to construct a JSON read request and HTTPS to POST it to the OPC UA ReferenceServer. The same variables can be read by any OPC UA Client using TCP and the binary data encoding. The parameters in the Read requests and responses are defined here.

The following figure illustrates the interactions between the website and the OPC UA ReferenceServer:

Read Sequence Diagram

Restrictions on cross-site scripting require the web server to forward requests to the HTTP endpoint exposed by the OPC UA ReferenceServer.

A BadUserIdentityToken rejected error will appear if not logged in. The access token is sent to the server as the Authorization header in the HTTP request.

The syntax used to specify NodeIds is defined in Part 6.


Node ID
Value
Timestamp