Maintenance of Standard, Custom Header & Body Parameters


Introduction:

This blog focusses on the usability of the Standard, Custom, Header and Body Parameters within an Action of the Action Project that can be maintained using the Actions Editor.

Parent Blog:

Actions Editor – Feature List, Usage and Maintenance of Actions Project

Concept & Need –

An API could be capable of consuming a complex input or returning a complex response structure but the “to-be” executed business process could only require a certain set of the parameters that is relevant for consumption. Similarly, not all the standard parameters may be sufficient while calling the API and there could be a scope for custom parameter to invoke an API and the business relevant data. This could be flexibly achieved by defining additional parameters.

Action Editor allows Action Designers to Add/Delete/Modify Input, Body and Output parameters within an Action of an Action Project. Additionally, It also provides the flexibility to Add/Maintain CUSTOM parameters that are not available from the API specification.

Deletion of Input/Output/Body Parameters:

Use Case:

An Action Designer can use the Delete feature to remove any unnecessary parameters from the definition of the Action making it more light and relevant to the business process. Let us try to understand this with an example.

Example: Deletion of Input Parameter in Action Editor

  1. Select the list of parameter(s) you want to delete.

Figure%201%3A%20Selecting%20Input%20Parameters

  1. After Selecting the parameter(s), Click on the Remove icon on the top of the table.

Figure%202%3A%20Remove%20Icon

Remove Icon

  1. After clicking on the remove icon, a “Remove Paramaters” dialog Box would appear Figure%203%3A%20Deletion%20Dialog%20Box

Remove Parameters Dialog Box

  1. Click on the “Remove” button & hit the Save button to complete the Deletion process.

Note: The process to delete an Input-Body & Output parameter is identical to the above.

Addition of Input/Output/Body Parameters:

Use Case:

An Action Designer can use the Add feature to add the Deleted Input/Output/Body parameters. Let us try to understand this with an example.

Example: Addition of Input Parameter in Action Editor

  1. Click on the “Add” icon above the table.Figure%204%3A%20Add%20icon

Add icon

  1. An “Add Parameters” dialog box would appear where you can select the parameters that were in a “Deleted” or “Inactive” state which can be re-added to the definition of the Action within the Action Project.Figure%205%3A%20%u201CAdd%20Parameters%u201D%20Dialog%20Box.

“Add Parameters” Dialog Box.

  1. After selection of the parameters, the users can click on the “Add” button and hit the Save button to complete the Add process. The Action Designer can also add “Custom” Parameters also which is discussed in the next section.

Note: The process to Add an Input-Body & Output parameter is identical to the above.

Adding a Custom field (parameter/header/query/path):

Concept & Need –

Often APIs expose complex parameters which may not be suitable to be exposed directly to a Action Designer and hence they need to be broken down into simpler parameters.

Feature Description:

  1. Actions Editor allows definition of custom input parameters apart from the standard API input parameters. These custom input parameters cannot be passed to the API but they are meant to be exposed to the Action Designer in the consuming Editor.
  2. The custom input parameters support same set of features as the other standard API input parameters in the Actions Editor – Label, Hide, default and static value definition.

Use Case:

An Action Designer can use the Add feature to also add a Custom header/query/path parameter that is originally not available within the definition of the Action of an Action Project from the specification. There could be potential use cases that that cannot be fulfilled by a standard parameter while invoking an API and this could be managed by defining a Custom Parameter. Let us try to understand this with an example.

Example: Addition of “Content-Type” Input Parameter in Action Editor

  1. Open the “Add Parameter” Dialog as shown in described in “Addition of Input/Output/Body Parameter” section. Click on the “Add a Custom Parameter” button. An empty row would be enabled to enter the Custom Parameter definition.Figure%206%3A%20%u201CAdd%20Parameter%u201D%20Dialog%20with%20Custom%20Parameter%20add%20field.

“Add Parameter” Dialog with Custom Parameter add field.

  1. Input the details.Figure%207%3A%20Adding%20Value%20of%20Custom%20fields%20in%20%u201CAdd%20Parameters%u201D%20Dialog

Adding Value of Custom fields in “Add Parameters” Dialog

  1. Click on Add icon & hit the save button to complete the addition of Custom field.

Blog Reference –

Thanks for reading and i hope it helped to understand the concept of maintaining the Parameters within the Actions Editor. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.