Skip to main content
Version: 5.4

REST Server

The REST Server plug-in can be used to provide APIs that are accessible from outside the OPC Router.

The following properties can be configured for the REST server:

NameAny name under which the REST server appears in the connection project. Choose a name that is unique for you during connection project planning.
Provide API via web management endpoint

If this option is active, the port of the OPC Router Web Management is used to provide the API in addition to the selected port.
Note: The target address of the API is extended by the prefix "services/{Plug-in Name}".
Note: If you use this function with Siemens Industrial Edge, the address without /opcrouter must be specified for clients in order for the connection to work. If the address in the plug-in is displayed as https://172.20.10.220/opcrouter/services/Test/api, https://172.20.10.220/services/Test/api must be specified in the client.

Port

The port on which the API should be accessible.

Note:

  • The port must not already be in use.
  • It is also important to enable the port in the firewall if you want to access the API from another device.
Route prefix

The prefix that must be specified after the IP address and port to reach the API.
Example:
If the route prefix is "/api", the full URL would be {IP/hostname}:{port}/api

Send errors as a responseIf this option is enabled, the status code is sent as a response when an error occurs.
Always send status codeThe status code is always sent, e.g., in the case of a successful transfer.
Authentication

Specify how to authenticate externally:

  • Anonymous
  • Basic
  • Lock API
Username (available with Basic authentication method)Username for login.
Password (available with Basic authentication method)Password for login.
SSLIf this option is active, SSL is used for the connection.
SSL certificate (available when SSL is activated)Certificate to be used for connections. The plus sign is used to add a certificate, the trash can to remove a certificate. The eye icon can be used to view the properties of the selected certificate.
Provide OpenAPI dataEnable this option if the OpenAPI data is to be provided. This is done in the form of a JSON file.