Example OPC-UA Device Provisioning Using the REST API

This topic provides the JSON payloads and cURL commands required to setup an example OPC-UA connection.

For information on the Edge Xpert OPC-UA Device Service, see OPC-UA.


The following JSON payloads and cURL commands can be used to setup the OPC-UA example:

  1. To setup the Profile, enter the following command:

    curl localhost:48081/api/v1/deviceprofile/uploadfile -F "file=@/usr/share/edgexpert/examples/opc-ua/prosys-opc-ua-simulation-server-profile.yaml"
  2. To setup the Device Service, enter the following command:

    curl --request POST \
      --url http://localhost:48081/api/v1/device \
      --header 'content-type: application/json' \
      --data '{
        "name" :"prosys-opc-ua-simulation-server1-address",
        "description":"Example OPCUA Server",
            "Address", ""
            "Security", "Basic256Sha256"
            "SecurityMode", "SignEncrypt"
          "name":"Prosys OPC-UA Simulation Server - Profile"


This example assumes that there is no Application URI in the certificate. If the certificate contains an Application URI, this must be specified or the OPC-UA Device Service cannot connect to the OPC-UA server.

Viewing Readings

For information on viewing the readings, see Viewing The Readings.