REST
Characteristics - REST
Representational state transfer (REST) is a software architectural style that describes a uniform interface between decoupled components in the Internet in a Client-Server architecture. To learn more about the standard visit the REST section in Wikipedia website.
Configuration - REST Server
The following sample configuration shows how variables can be made accessible over a REST server.
Select the root model node in the tree on the left.
Enter a path prefix.
Configure the REST Server endpoint.
Enter the IP.
Enter the port.
Enter the Content-Type.
Check the webapp checkbox and provide the WAR-file if you want to host an application.
Click the Apply button and save the Channel by clicking the Save button on the upper right corner.
Description of configuration properties:
Property |
Description |
Example |
---|---|---|
pathPrefix |
Prefix for the URL |
|
Port |
Port of the REST server |
|
IP |
IP address of the REST server |
|
DefaultContentType |
Is used to indicate the media type of the resource |
|
webapp |
Possibility to host an application |
|
Configuration - REST Client
The following sample configuration shows a GET request using url parameters.
Select the root model node in the tree on the left
Select the content type - defines the media type of the associated representation
Set the wait timeout
Select the Command node
Enable the Command routes checkbox for the configuration of the following fields:
Enter the URL - If URL parameters are used then add each parameter in the following syntax
${id}
Select the HTTP method.
(Optional - Headers) Enable the checkbox Headers for the configuration of the following fields:
Enter the name of the header
Enter the value
(Optional - Headers) You can add multiple header entries by clicking the Add button
(Optional - Headers) Headers can be deleted by clicking the delete button
(Optional - Authentication) Enable the checkbox Authentication for the configuration of the following fields:
Select the Type of the Authentication
Enter the Username and Password or select it from the Credentials Manager
(Optional - URL Parameters) Select a custom variable and enable the command routes checkbox
(Optional - URL Parameters) Enable the command routes for the configuration of the following fields:
Select the Content Type
(Optional) Enter a Field Name in case the Information Model Node is not matching the REST API
Description of configuration properties:
Property |
Description |
Example |
---|---|---|
URL |
URL of the REST API. |
|
HttpMethod |
HTTP method for the action performed by the Client. |
|
HeaderName and Header Value |
To provide server and client with additional information |
|
Default Content Type |
Is used to indicate the media type of the resource. |
|
RouteHeaderConfiguration |
Headers represent the meta-data associated with the API request |
|
Authentication Type |
Type of the Authentication |
|
Content Type of Parameter Nodes |
Type of the Parameter |
|
Field Name |
For non-matching Information Model nodes and API spelling |
|
WaitTimeoutDuration |
Timeout in seconds until request is failing |
|