Request is used to consume a RESTful web service. Typically this is used to call APIs provided by third-parties.
RESTful web services allow users to access and manipulate web resources through a consistent set of methods. A web resource is something of an abstract concept but essentially it can be any entity that can be represented by some set of data. Sending a request to the URL that identifies the resource results in a response with some data being returned. Typically responses are returned in JSON, XML, or HTML format. Responses typically include information about the resource that was targeted and may also include links to other related resources. More information about REST architecture and RESTful web services can be found here.
Request Basic Use Example
Under the “REST Services”, drag over the Request option to the Process Canvas. This will create a “Request” Service on the Process Canvas. Grab one of the connector nodes from the “Start” service and connect it to your newly added “Request”. Now double click the service to configure it.
The input “URL” is the URL that identifies the web resource you are targeting. In this example we are using “https://ec.krisesystems.com/easycommerce_PD/REST/JSON/JDEStatus” as our URL.
Adding Content Type
The input “ContentType” indicates the media type of the input data you have provided, as well as the media type you are requesting for the response. Please see the valid values for this input in the below picture:
Form Fields and Headers
This service allows us to give to the field in the submitted form data through form fields input. We can also include HTTP headers using the Header input.
In this example we are passing “Key” as a header value which is required to indicate that we are logged into the portal.
In the output logs we can see the URL, ResponseCode, and Response along with the Start time, end time, and duration the service ran.