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 result | Checkbox | 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 |
Username for basic authentication | Any string | Http basic authentication user | no |
Password for basic authentication | Any string | Http basic authentication password | 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 |
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 |
See also