Top
Top
LibraryEASYProcess Reference Manual 5ProcessesServicesRESTWorkshopRequest

Request Overview

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 Use Examples
Workshop:RESTWorkshop
Service:Request
Inputs
UrlThe URL that identifies the web resource you are targeting.

MethodThe HTTP method associated with the action you would like to perform. Typically the implemented actions for a RESTful web service are GET, PUT, POST, and DELETE: GET to retrieve a resource, PUT to updated an existing resource, POST to create a new resource, and DELETE to remove an existing resource.

HttpContentThe payload of request you are sending. This should contain the formatted data you are passing to the web service when creating or updating a resource. This is typically only needed for the POST and PUT methods.

ContentTypeThis input indicates the media type of the input data you have provided, as well as the media type you are requesting for the response. This input is used as the value for the HTTP header "Accept." Valid values for this input are Multipurpose Internet Mail Extensions (MIME) types such as "application/json", "text/plain", or "multipart/form-data"

FormFieldsThis is the container node that contains all the FormField nodes. It does not accept any input, but you can Right-Click to add new FormFields (FormField #0, FormField #1, etc.). Each FormField below this node represents a field included in form-data submitted. FormFields are only used when using the "multipart/form-data" and "multipart/mixed" ContentTypes.

FormFieldThe FormField is a container node which accepts no input, but represents a field you would like to include in the form-data of the request body. Each FormField node is indexed.

NameThe name you want to give to the field in the submitted form data.

ValueThe value to be associated with the field in the submitted form data.

HeadersThis is the container node that contains all the Header nodes. It does not accept any input, but you can Right-Click to add new Headers (Header#0, Header#1, etc.). Each Header below this node is added as a header field to the HTTP request.

HeaderThe Header is a container node which accepts no input, but represents a single HTTP header field you would like to include in the request. Each Header node is indexed.

NameThe name of the HTTP header you would like to include. The values here can contain both standard and non-standard HTTP headers. Note: the "Accept" header is always added by default with the value provided in the ContentType input.

ValueThe value of the HTTP header field you would like to include.

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.

Add URL

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.

Output

In the output logs we can see the URL, ResponseCode, and Response along with the Start time, end time, and duration the service ran.


Powered by EASYProcess (© 2019 K-Rise Systems, Inc).