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
Send entire message including headerstrue / falseIf true, sends the raw message. If false only sends the data under the payload/body/ branch.no
Publish resulttrue / falseEnable 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
Authentication methodNONE / OAuth / Basic / NTLM / CookieDescribes the type of authentication used.yes
Grant typepassword / client_credentialsDescribes the grant_type for the authentication.yes
UserAny stringOnly used if Authentication method is not NONE. HTTP Authentication user no
PasswordAny stringOnly used if Authentication method is not NONE. HTTP Authentication password no
OAuth client_idAny stringOnly used if Authentication method is OAuth. The OAuth client_id public identifier for apps.no
OAuth client_secretAny stringOnly used if Authentication method is OAuth. The OAuth client_secret known only to the application and the authorization serverno
OAuth token_urlValid URLOnly used if Authentication method is OAuth or COOKIE. URL to get access token no
NTLM DomainAny stringOnly used if Authentication method is NTLM. NTLM Domainno
NTLM WorkstationAny stringOnly used if Authentication method is NTLM. NTLM Workstationno
Message exitClass nameMessage exit class name (e.g. Base64Exit) to process before sending the message.no
Message exit option stringComma separated list of field valuesIf option value is found in message, it will apply the message exit (e.g. converting a list of attachments into Base64)no
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
Invalid message HTTP return codesComma separated list of HTTP return codesComma separated list of HTTP return codes that define "failed" HTTP requestyes
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