HELP!

Call REST Web Service

This build tool enables connection to any RESTful web service through the use of auto-generated JavaScript code. The setup is done as follows:

  • Drag-and-drop the build tool to the desired location on the tree, then specify a name for the object.
  • Enter the endpoint URL to be called, and select between GET or POST request type.
  • Select between Basic or Advanced
  • Select how to send the payload JSON String or Query String. JSON string is recommended for the vast majority of use cases.

Basic

  • Specify inputs: this is done by setting JSON key-value pairs using hardcoded keys and either hardcoded values or values read from objects.
  • Specify outputs: this is done in a similar manner to inputs, but selecting objects to store output values in instead.

Advanced

  • Specify input JSON: This is a freetext editor to type out a JSON payload. This can use Xpertrule JS objects to get values from within the inference.
  • Specify Output: A second freetext editor to tell the inference engine what to do with the response.

For more information on using scripting in Viabl, see the guide here

On This Page