Description

The Rest sender plugin sends messages by posting to an http/https url. JSON format is supported.

Prerequisites

Installation

Make sure you have the 1gateway zip file that includes the plugin files and valid licences information ready. This file has been provided to you with the installation files.

1 - Login

Login to 1gateway, and make sure you are in "Advanced mode". If this is the first time you log in, the default user and password are both 'admin' (without the quotes).

2 - System Maintenance

Click on the menu icon and choose the option "System maintenance"


3 - Upload file


In the System maintenance view you can either drag and drop the downloaded zip file or select it by clicking the "choose file" button.

4 - Restart

After the upload installation will be confirmed. Restart 1Gateway to ensure any locked files are updated.

Configuration


Open the main menu and click on "New plugin"

Select the plugin you want to configure. Use the Filter field if needed.

The REST sender sends data to a configured web service endpoint. Currently, only the JSON format is accepted. The following configuration options are available: 

Field name

Supported values

Description

required

url

Any string

Endpoint to send the request to

yes
Publish resultCheckboxEnable if you want to republish the result of the request as a 1Gateway internal message.no

Result message type

Any string

Defines the 1Gateway internal message type the requests results gets assigned to. Only applies if checkbox 'Publish result' is enabled.

no
Username for basic authenticationAny stringHttp basic authentication userno
Password for basic authenticationAny stringHttp basic authentication passwordno
AcceptAny stringapplication/jsonyes
ContentTypeAny stringapplication/jsonyes
Header (1-5) nameAny stringHeader name to send in the requestno
Header (1-5) valueAny stringHeader value to send in the requestno
MethodSelectionSelect between put and post methodyes
FiltersSelectionSelect or define filters to match messages required. If left empty ALL messages will be processed.no

Mapper Configuration

For proper function, the REST sender plugin needs configured mappers. By default, no mapper is deployed. The following mapping options are available:

Mapping toDescriptionrequired
payload/bodyMap what gets loaded in the JSON body. Apply a mapping for every name / value pair you use in the payload body.yes
payload/options/urlOverwrites the url defined in the configuration sectionno
payload/params/<parametername>Adds a parameter to the url. Multiple parameters can be applied.no

See also