Rest Sender
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 headers | true / false | If true, sends the raw message. If false only sends the data under the payload/body/ branch. | no |
Publish result | true / false | Enable 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 method | NONE / OAuth / Basic / NTLM / Cookie | Describes the type of authentication used. | yes |
Grant type | password / client_credentials | Describes the grant_type for the authentication. | yes |
User | Any string | Only used if Authentication method is not NONE. HTTP Authentication user | no |
Password | Any string | Only used if Authentication method is not NONE. HTTP Authentication password | no |
OAuth client_id | Any string | Only used if Authentication method is OAuth. The OAuth client_id public identifier for apps. | no |
OAuth client_secret | Any string | Only used if Authentication method is OAuth. The OAuth client_secret known only to the application and the authorization server | no |
OAuth token_url | Valid URL | Only used if Authentication method is OAuth or COOKIE. URL to get access token | no |
NTLM Domain | Any string | Only used if Authentication method is NTLM. NTLM Domain | no |
NTLM Workstation | Any string | Only used if Authentication method is NTLM. NTLM Workstation | no |
Message exit | Class name | Message exit class name (e.g. Base64Exit) to process before sending the message. | no |
Message exit option string | Comma separated list of field values | If option value is found in message, it will apply the message exit (e.g. converting a list of attachments into Base64) | no |
Accept | Any string | application/json | yes |
ContentType | Any string | application/json | yes |
Header (1-5) name | Any string | Header name to send in the request | no |
Header (1-5) value | Any string | Header value to send in the request | no |
Method | Selection | Select between put and post method | yes |
Invalid message HTTP return codes | Comma separated list of HTTP return codes | Comma separated list of HTTP return codes that define "failed" HTTP request | yes |
Filters | Selection | Select 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 to | Description | required |
---|---|---|
payload/body | Map what gets loaded in the JSON body. Apply a mapping for every name / value pair you use in the payload body. | yes |
payload/options/url | Overwrites the url defined in the configuration section | no |
payload/params/<parametername> | Adds a parameter to the url. Multiple parameters can be applied. | no |