Generate Parameters from a Template

Within the ‘Parameters Manager Control Panel’ for any Request or Response configuration find the ‘Load Template to Generate Parameters’ tool. If there is an existing JSON structure of the variables required, the parameters can be added through the use of a template using the ‘Generate Parameters’ tool.

Clicking this tool opens up a pop-up box into which you can paste the template for the payload. The ‘Content Type’ that you have specified for the Request or Response in the ‘Request / Response Manager Control Panel’ will determine the template format that you will need to paste e.g. JSON or XML format.

Additional Options:

  • The ‘Add Only New Parameters’ checkbox enables you to avoid duplicating auto-generated parameters when making updates to the template you are loading.
  • The ‘Path Not Included’ checkbox informs GLU to ignore the missing path if it’s missing from the template.

When pasting your template, check it’s formatted correctly by clicking on the ‘Format’ button and make any corrections needed.

Thereafter by clicking on ‘Generate Parameters’, GLU will auto-create all parameters in the Template within the applicable Request / Response Parameter set. Additionally, the ‘collection path’ for each parameter is auto-populated. This is tremendously useful especially when the template has a ‘deep’ tree structure. If your variables JSON looks like this:

“input”: {
“beneficiary”: {
“bankAccount”: {
“name”: “Sample Account”,
“bankId”: “absa”,
“accountNumber”: “1234567890”,
“accountType”: “current”,
“beneficiaryType”: “private”,
“reference”: “TestBeneficiary”

The beneficiaryType parameter will have the marshaling object/collection path set as input.beneficiary.bankAccount.

This will ensure that when the variables JSON is generated from the Outbound Request parameters, the beneficiaryType parameter will be generated in the JSON payload in the correct position.

For each parameter that is added through a template load, GLU parameters need to be mapped.

This feature provides the most efficient mechanism to quickly generate Request and Response payloads. We recommend that you use ‘working’ sample test message templates too (as often sample templates in API specifications are not 100% correct).

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Fill the form and we’ll contact you shortly

    I agree with

    We uses cookies to make your experience on this website better. Learn more
    Accept cookies