Maintenance of Standard, Custom Header & Body Parameters
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.
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:
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
- Select the list of parameter(s) you want to delete.
- After Selecting the parameter(s), Click on the Remove icon on the top of the table.
- After clicking on the remove icon, a “Remove Paramaters” dialog Box would appear
Remove Parameters Dialog Box
- 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:
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
- Click on the “Add” icon above the table.
- 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.
“Add Parameters” Dialog Box.
- 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.
- 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.
- 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.
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
- 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.
“Add Parameter” Dialog with Custom Parameter add field.
- Input the details.
Adding Value of Custom fields in “Add Parameters” Dialog
- Click on Add icon & hit the save button to complete the addition of Custom field.
Blog Reference –
- Part 1 of the Blog Series: Actions Project – Major Changes including the Actions Editor Available Now !!
- Part 2 of the Blog Series/Parent Blog: Actions Editor – Feature List, Usage and Maintenance of Actions Project
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.