RESTCall Step

Use this step to make a REST Call.

Last published at: October 18th, 2024

Description:

Makes a REST call and returns JSON or XML

 

Inputs

  • restURL – URL to call
  • method – http method to use, Get, Post, Put, Delete
  • username – authentication user name
  • password – authentication password
  • payLoadType – XML, JSON, FormURL or FormData
  • requestBody – JSON or XML body
  • responseType – return type JSON or XML
  • sourceFilePath – file path to upload
  • headers – custom headers to add
  • varToStoreResult – variable to store the response 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the “RESTCallDef” example.          

  • Create a new definition called “RESTCallDef”
  • Select the definition and click the “design” button
  • Drag a “RESTCall” step from the toolbox
  • Connect the dots between the start and “RESTCall” step
  • Define a variable/global to store the result after execution
  • Click the "RESTCall" step to configure its "Settings" properties. Provide a name to the step. Provide the REST call URL. Select the REST call method (Get, Post, Put, Delete, Patch). Provide the variable/global to store the result. 

 

  • Click the "RESTCall" step to configure its "Advanced" properties. Provide the authentication user name and password. Select the payload type (the name of the step. Provide the REST call URL. Select the REST call method (XML, JSON, FormURL, Formdata). Select response type (XML, JSON, Formdata). Provide the server file path of the source file to be uploaded. Click on SAVE to confirm the changes. 

 

  • Click on “Headers” to configure. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute. Render the process instance. Click on the process step to view its properties. The step should get and store an access token in a variable/global. 

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.

Click here to download the sample file.