This topic walks you through the process of taking the attached example project and modifying it to work with your webservice project and send a client-side request. When you run the example from the logicnet, the system will ask a few questions that are generic and can be easily changed to fit your webservice. Download the example project and import it into your Designer.
Node 30 of the example is a project node with a ‘set_data_object’ part. This part sets the full URL of the endpoint of your webservice call: <url>/<company>/<publish project name>/<endpoint name>. This variable is used throughout the example.
Update Security White List
- On your LogicNets dashboard, navigate to System Configuration.
- From the Security tab, add the text below to the Content Security Policy setting, making sure you change ‘https://your-site-name’ to the base URL where your webservice is hosted.
default-src 'self'; script-src 'self' www.gstatic.com www.google.com www.googletagmanager.com www.google-analytics.com www.googleadservices.com http://localhost:41666 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' www.google.com 'unsafe-inline' www.google-analytics.com https://googleads.g.doubleclick.net data:; connect-src 'self' www.google-analytics.com www.googletagmanager.com http://localhost:41666 https://your-site-name; frame-src 'self' www.google.com;
Update Authorization Token
- On your LogicNets dashboard, navigate to Access Management.
- Go to the Users tab and click new.
- From the Type dropdown menu, select server to create a new server user.
- Go to the Groups tab and create a new group.
- Add your newly created user to the group.
- Go back to the user you created and click modify.
- Select RS256 signed JWT Web token from the Authentication Method dropdown menu and click Generate new RSA key pair.
- Save the private key. You will need this for the client.
- On the LogicNets dashboard, navigate to Access Management.
- Go to the Server connections tab and click new.
- Select Add account manually from the Type dropdown menu.
- In the External instance URL field, enter [<your-site-name>/<company-name>]
- In the User name field, copy the username that you just create on the server.
- Select RS256 from the Password type dropdown menu.
- Copy your private key into the Private RSA Key field.
- Select Send feedback from the Purpose dropdown menu.