Create a New REST Web Manipulator

The sub-branches beneath a newly created Web Service (as mentioned in Create a New Web Service - REST) allow you to create a Web Manipulator.

 

A Web Manipulator allows users to call a REST service on demand, rather than being tethered to a single subscription during runtime. This also allows users to modify parameters before calling a service. Once configured, a Web Manipulator can be selected as a data source from the Data Browser. Note that a Web Manipulator will not show a live value in runtime until it is executed.

 

[Click HERE for more info on Web Manipulator for REST Web Services.]

 

To Add a New Web Manipulator

  1. Right-click on a sub-branch beneath a Web Service and select "Add Web Manipulator" as shown below.

Adding a New Web Manipulator

 

-OR-

 

Select a sub-branch beneath a Web Service, then click on the Add Web Manipulator button, shown below, in the Edit section of the Home button in the Workbench.

 

Add Web Manipulator button

  1. This opens the Web Manipulator properties in the right-pane of the Workbench as shown below. Enter a Name in the top text entry field.

New Web Manipulator Properties

 

General Settings

Parameters

 

Click the "+ Click here to add new item" link to add a new parameter. You can then enter a Name, Value, and Kind (using the pulldown menu, select from Query String or POST Body, Cookie, URL Segment, HTTP Header, Query String, or Request Body) and select whether the parameter will be Sensitive (by clicking the checkbox within that column).

 

       When a parameter is marked as Sensitive, it will be obscured in the Workbench UI so that its value cannot be read. It will also be removed in runtime from the point name. For security reasons, unchecking the Sensitive checkbox will clear the parameter value.

 

       As described above, the supported parameter types are:

To simplify runtime usage, Request Body parameters also support virtual parameters. Consider the following example where an HTTP POST is made to create a new social media post on an API:

 

 

Web Manipulator to create a new post

 

Typically, a request body parameter will appear in the point name when browsed in runtime carrying the whole JSON:

 

Web Manipulator runtime point name with JSON

 

This leads to lengthy point names which are difficult to modify in runtime, especially when the JSON is complex.

 

With virtual parameters, it is possible to parameterize the Request Body so that only selected parts are changeable in runtime. Following the example above, assume we want to parameterize just the title and the body of the post that we want to create. We can go ahead and replace the values with a name of a parameter, prefixed with the special @ character:

 

Substituting virtual parameters in the Request Body

 

Then, we can proceed to create individual parameters for title and body, with Kind set to Query String or POST Body:

 

Creating virtual parameters

 

The final result is that in runtime, the Request Body parameter will not be a part of the point name anymore. We will see the title and body parameters instead:

 

Virtual parameters in the point name

  1. Once you have completed making edits to the Web Manipulator, click Apply to save your settings and Close to exit.

See Also:

Create a New Folder

Create a New Web Service

Web Services Overview

Create a New REST Web Method

Create a New Web Authentication Method