Hello, how can we help you?

Recent Searches: Configuring timestamps - SoftExpert Asset widgets - Workspace - 2.2.3 - Workflow - 2.2.3

Configuring a REST data source

 

Prerequisite

  • Access to the Configuration > REST data source (AD052) menu.

 

Introduction

The system allows for configuring data sources in order for SoftExpert Suite to connect to other systems via REST web services.

See how to configure a REST data source in the system:

 

Configuring a REST data source

A REST data source can also be configured to use the SoftExpert Suite APIs. For each REST interface provided by SoftExpert Suite, a REST data source must be set up. For example: to use the RIS_RISK_INTERFACE interface, a REST data source must be created to establish the connection; it will have the necessary parameters for this interface. If, in addition to this interface, the RIS_CONTROL_INTERFACE is also used, another data source will have to be created.

 

See additional information about each of the steps for creating the REST data source:

REST service data

Service data

The ID # must contain letters and may contain numbers, but cannot start with numbers.

In the Service URL field, we must enter the REST API URL that will be used for the integration. If the service will use parameters of the PATH type, they must be inserted in the URL itself (simply add an endpoint, such as: https://exampleservice.com/user/{path}). Note that the PATH parameter that is inserted in the URL will be added by the system in the Input parameter step; this input parameter must have a value during consumption for the operation to be carried out successfully.

If we enable the Internal SE Suite web service option, it will be possible to select an internal REST API provided by SoftExpert Suite. Thus, a source will not need to be created if the environment's domain configurations are changed.

When configuring a REST interface provided by SoftExpert Suite, it is possible to obtain the service URL in the Reference section.

 
 

Input parameters

HTTP methods available for selection:

GET Retrieves data from the added service.
POST Sends data of the added service.
PUT Updates data of the added service.
DELETE Removes data of the added service.

Parameter types available for selection:

QUERY Indicates that the parameter will be a Query string.
HEADER Indicates that the parameter will be a Header required for the request.
PATH This option will not be available for selection. It will be shown selected if the listed parameter is an endpoint in the service URL inserted in the previous step.

Data types available for selection:

STRING The parameter value will be of the text type.
NUMERIC The parameter value will be of the numeric type.
DECIMAL The parameter value will be of the numeric type, with decimal places.
BOOLEAN The parameter value will be of the logic type: true or false.
DATE The parameter value will be of the date type. When this option is selected, the Date mask field will be displayed. In it, select the date format in which the parameter value must be entered. See usage examples below.

If the previously selected method is POST or PUT, the Request body field will be displayed; use it to insert an example for the request body in JSON format. The body example will be used for SoftExpert Suite to map the attributes that will be sent by the request. 

See an example of the request body that can be inserted in the displayed field:


{  
 "id": 1,  
 "name": "New example name"  
}


It is also possible to send examples with date type:


{  
 "id": 10,  
 "name": "example",  
 "admission Date": "MM/dd/yyyy"  
}

 

The date parameter must be using the formatting value correctly. See some examples of date formats:

Format Description Example
MM/dd/yyyy American date pattern 06/22/2024
dd/MM/yyyy European date pattern 15/03/2024
HH:mm:ss Hours, minutes, and seconds 18:37:05
KK:mm:ss a     Hours, minutes, and seconds (AM/PM) 07:44:23 PM
dd/MM/yyyy HH:mm:ss     Date, hours, minutes, and seconds 26/12/2024 12:30:55
dd/MM/yyyy KK:mm:ss a Date, hours, minutes, and seconds (AM/PM)     12/07/2024 11:50:02 AM
EE MMM dd hh:mm:ss Z yyyy Descriptive date, day, time (AM/PM), time zone, and year Tue ago 16 12:00:00 BRT 2024

When configuring a REST interface provided by SoftExpert Suite, select the POST method. The request body can be obtained in the Reference section.

 
 

Output parameters

The examples to be inserted in the Response body are similar to those described for the Request body, in the Input parameters step.

When the body of the request/response is inserted in the Input parameters and Output parameters sections, problems may occur and prevent it from moving on to the next step. Refer to the Troubleshooting section to see possible problems and their solutions.

When configuring a REST interface provided by SoftExpert Suite, you can find the response body in the Integration Guide document.

 
 

Security

In the Security tab, it is possible to define a security list for the REST data source, restricting access to the necessary users only.

Check the options available in this tab:

Private

Only the users defined in this tab will be able to edit or view the REST data source. To do that, use the following columns:

  • Edit: define the users, teams, departments, and/or positions that will have permission to edit the data source.
  • View: define the users, teams, departments, and/or positions that will be allowed to view the data source.

Public

All system users will be able to view the REST data source, but only those defined in the corresponding column will be allowed to edit it. Therefore, the View column will be disabled (since the data source can be viewed by any user). 

In the Edit column, define the users, teams, departments, and/or positions that will have permission to edit the data source data.

 
 

Summary

After clicking on the Consumption test button, use the screen that will open to provide the required information, in accordance with the specifications of the service being consumed. 

Among the parameters available in the consumption test, the following information can be inserted:

Path Parameters of the PATH type defined in the service URL.
Query Parameters of the QUERY type defined in the Input parameters step.
Header Parameters of the HEADER type defined in the Input parameters step.
Request body Parameters of the request body used to consume the services.

To consume the service, click on the Execute button at the bottom of the screen. Two response types may be displayed:

  • Success: consumption was successful. In this case, it will be possible to view a JSON with the service return via SoftExpert Suite.
  • Something went wrong: there was a problem while consuming the service. Refer to the Troubleshooting section to see the possible responses and their meanings.
 
 

 

Conclusion

All done! Now you know how to configure a REST data source in the system.


Was this article helpful?