Skip to main content
Version: 5.6

REST in the OPC Router: Structure and Responsibilities

This chapter describes the common terminology used in the REST documentation for the OPC Router. It explains the functions of each plug-in, trigger, and transfer object, and when each element is used.

The focus is on the mapping of OPC Router elements, not on general roles within a RESTful web service.

At a Glance

In the REST section of the OPC Router, there are two technical roles:

  • The REST client calls external REST interfaces.
  • The REST server provides its own REST endpoints that can be called by external systems.

Different elements are used for these roles:

PurposePlug-inTrigger or Transfer Object in the Connection
Call an external REST interfaceREST Client plug-inREST Client transfer object
Provide a custom REST endpoint in the OPC RouterREST Server Plug-inREST Trigger

Responsibilities of the Elements

ElementResponsibility
REST Client Plug-inProvides the connection to an external REST interface. For example, the host URL, authentication, certificates, and OpenAPI file are configured here.
REST Client Transfer ObjectUses a REST client connection within a session to execute a specific REST call.
REST Server Plug-inProvides the technical foundation for custom REST endpoints in the OPC Router, such as port, route prefix, authentication, and SSL.
REST TriggerUses a REST server connection within a connection to provide a specific endpoint and execute a transfer when called.

Difference Between a Plug-in and a Trigger or Transfer Object

Plug-ins define general technical accessibility and security. Trigger and transfer objects within a connection define the specific data flow.

This means:

  • The plug-in specifies where and how a REST interface can be accessed.
  • The transfer object or trigger specifies which endpoint is used and which data is transferred.

Common Terms

Endpoint

An endpoint is the specific address of a REST function.

  • For a REST client, this is the target path of an external interface.
  • For a REST trigger, this is the path under which the OPC Router itself provides a function.

HTTP Method

The HTTP method specifies what type of action a call to an endpoint triggers. Common methods include:

  • GET – Retrieve data
  • POST – Send data or initiate a process
  • PUT – Create or completely replace data
  • DELETE – Delete data

Request Parameters

Request parameters are values sent with a REST call. These include, for example:

  • URL segments
  • Query parameters
  • Header fields
  • Content in the request body

Response Parameters

Response parameters describe the data that is read from a REST response or returned in a REST response.

  • For a REST client, response parameters are read from the response of an external RESTful web service.
  • For a REST trigger, response parameters are sent back to the calling client.

Authentication

Authentication is generally configured in the respective plug-in.

  • For the REST client, it pertains to accessing an external RESTful web service.
  • For the REST server, it pertains to external clients accessing the endpoints provided by the OPC Router.

OpenAPI

OpenAPI is a standardized format that describes the endpoints and parameters of a REST interface in a machine-readable format (as a JSON or YAML file). If such a description is available, endpoints and parameters can be imported into the OPC Router more conveniently, rather than having to be entered manually.

Decision Guide

Use the following combinations:

  • To call an external REST interface: REST Client plug-in and REST Client transfer object
  • To provide your own REST endpoint in the OPC Router: REST Server plug-in and REST Trigger