Users can define Filters for integration scenario as per business requirements for the GET, POST and PUT operation for REST based application. This section of the document provide details of these filters and steps on how to initialize these filters.
Note: If you have taken Pre-packaged apps and its connection templates, Touchpoints will also come pre-packaged
Defining Action Filters
For GET Operation
The GET Operation is for fetching data from REST. Use GET requests to retrieve resource information only – and not to modify it in any way.
As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should fetch multiple identical requests and produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.
1 Go to the App Section and choose Create the Technology App for creating REST based Application.
3 Here you have to define action filters for the REST based connection by clicking on the
GET node of the workflow.
View the right side panel and click
Filter button. The following screen appears.
Here Lightspeed app has been taken and it supports OAuth 2.0 for Rest Protocol. hence you need to define both
NOTE: Defining Header and Parameter Varies from application to application. Some app might need both, some might just need Header/parameter
Click on the Action Filter Tab, to define the action for the GET node.
- Endpoint - Each endpoint is the location from which APIs can access the resources from the respective module of the application.This is a mandatory field, enter the endpoint
- Decsription - This field enables you to decsribe the endpoints. This is a mandatory field, enter the description
- HTTP Method - The HTTP verbs comprise a major portion of our
uniform interfaceconstraint and provide us the action counterpart to the noun-based resource. Here you need to select
GETfrom the drop down list for executing the GET Operation.
- Content Type - The Content-Type entity header is used to indicate the media type of the resource. In responses, a Content-Type header tells the client what the
content type of the returned content actually isSelect from the drop down list. This is of two types
- Header - Use the headers to provide information about the entity or other resource that you are requesting. Each app has its own REST API supports its own set of HTTP headers. Header has two section, insert the header type and header values here. Add button enables to add more header fields, if required.
- Parameter - The rest parameter syntax allows us to represent an indefinite number of arguments as an array. With the help of a rest parameter a function can be called with any number of arguments, no matter how it was defined. Parameter has two section, insert the parameter type and parameter values here. Add button enables to add more parameter fields, if required.
- Response Map - Not Applicable here.
- Body - Not Applicable here.
Now you have successfully defined the action filter for
GET Operation supporting REST protocol.
Here in the example, the relationship between key and value is
value for key is
Note: For any XML & JSON extension in the endpoint name, use $ before the extension while inserting the key, e.g:
Defining Error Filters for Get Operation
Error filters are defined in GET Operations to resync any failed data during integration.
- Click resync filter, option to define error filter for GET Operation.
- The following screen appears
- Select the HTTP method as - GET & Content Type - application/xml
- Now Go to the
Resource Pathoption under Rest Schema to define the Error Filter as shown in the screen given below
- Enter the Key - This is the combination of the
$which is the Record ID.
- Value field remains empty.
- Click Save once done.
Under the parameter section, the value for
key is available in respective application of API doccumentation.
If the relationship between key and value is not
=, then the
value must be declared in the
section itself and the
value must be kept blank.
For POST Operation
The POST Operation is for adding data to REST. The configuration for the POST is to be done in the Schema level of the REST Application. The steps for configuring POST in Schema level is given below:
- Go to the workflow section, Create Workflow and you can Create Touchpoints directly from the workflow workarea itself for REST based application.
3 Here you have to define action filters for the REST based connection by clicking on the node (POST) of the workflow.
View the right side panel and click
Action button. The following screen appears.
Enter all the required field like - Endpoint, Description, HTTP Method, Content type and Header value for the Post Operation.
The HTTP Method willbe
The above steps complete the process of defining filters for integration in REST.