Datapolis Process System


Home > Tutorials > Calling REST Services

Calling REST Services



This tutorial will show you how to use Call REST Service function to get data (in this example it will be JSON) from external REST service. For this tutorial i will use service, which returns us currency exchange rate for different kind of currencies.

The end result looks like this:

Creating workflow

Create simple workflow with one action launch form and one string variable. Name this variable result.



Creating activity to set result

Go to the action Activities editor and add Set variable activity:


In a Variable section add lookup to the result variable which we create earlier, and as a ​New value​ add lookup to ​Call REST Service function. Result should looks like on screen below:



Call REST Service - Example of use

In this particular example we want to call REST service which returns us exchange rate for different currencies base on current Euro (EUR) exchange rate. We need to complete function fields as below:



  • Request URI: ​in this field you specify address of REST query
  • Login and Password: if service which you want to call needs additional credentials specify them in this place
  • ​Content Type: content type which you expected to get/post from/in REST service (JSON or XML)
  • ​Headers: ​additional HTTP headers if REST service requires once
  • Method: REST method which you want to use - GET, POST, PUT, PATCH, DELETE
  • Encoding: specify encoding of your REST request (UTF-8 is default)
  • Post datain this place you can write your own JSON or XML ​which you want to upload on REST service


Deploy and run

Remember to deploy your workflow before leaving designer. Now you can check how everything works by starting workflow and running the action.




You can also Download workflow definition and load it to your designer.