
Motivation:
This blog focuses on the usability of the Output Section within an Action of the Action Project that can be maintained using the Actions Editor. The Output parameters help to describe and maintain the response structure of the API.
The Actions Project and the Action Editor are generally available from 18th October 2022.
Parent Blog:
Please go through the following blogs written by my colleague, Vivek Vishal, for more information.
Actions Editor – Feature List, Usage and Maintenance of Actions Project
Blog Series
Concept & Need:
The Output Section contains a list of http-codes that could be part of a response from an API. Each of these http-codes contain a list of parameters.
When an API responds with a particular http-code, the response would contain the same structure as described by the Action Designer in this Section.
The Action Designer can modify the list of http-codes by Adding/Deleting the code from the Drop Down list. While adding a new http-code, validation is being done.
In the case when no http-codes are found in the schema, a default code is added with the name ‘default’.
The Action Designer can design the response structure for each of these http-codes by modifying these parameters.
Modifications that can be done are as follows:
A basic use case for this is when an Action Designer wants to trim down the parameters that might not be relevant to the Business Process at hand but which is part of the response from the API. He can achieve this by simply deleting the parameters which are not relevant to him and keeping the ones which are required and specific to his use case.
Example:
Figure 1: Select Output/Error code
Users can then make modifications to the structure of the selected code as follows:
Sort:
Designers can sort across Ascending and Descending order through the parameters which will help them in quick selection of the parameters.
Figure 2: Sorting through the parameters
Search:
Designers can search through the parameters as shown below. This will help them in quick selection of the parameters.
Figure 3: Searching through the parameters
Delete Parameters:
Figure 4: Select Parameters.
Figure 5: Remove Icon
Figure 6: Remove Parameters Dialog.
Figure 7: Permanently delete fields.
Add Parameters:
Figure 8: Add Field.
Figure 9: Add Parameters Dialog.
Figure 10: Add Parameters using Side Panel.
Figure 11: Add Fields.
Figure 12: Custom Parameters are added to the table.
Figure 13: Adding Fields using Sample JSON
Figure 14: Wizard with JSON Editor and Preview
Figure 15: JSON Editor
Figure 16: Output Preview
Figure 17: New Fields are added to Table
Modification of Output Parameters:
Changing the Label:
Figure 18: Edit Label
Figure 19: Enter Label value.
Figure 20: Modified Label.
Changing the API Format:
Concept & Need:
Please refer to the Blog by my colleague Akshil Verma on API Formats to understand its relevance and functionality.
Example:
Figure 21: Select API Format.
Figure 22: API Format Drop Down.
Figure 23: Modified API Format.
Note: Format cannot be added to object, array type parameters and currently Format is enabled only for “string” type parameter.
Changing Tags:
Concept & Need:
Responses from an API may contain many arrays; it is sometimes necessary to mark a particular array as the Main Output Array. This will help the Citizen Developer consuming the Action in searching through the response received. Similarly, responses can be tag
Here are the total list of Tags that can be added for output fileds:
Out of these tags only Main Output Array, $At, $From and $To can be used in parameters of Output Section and the remaining in Input Section.
Example:
Figure 24: Select Tags.
Figure 25: Tags Drop Down
Figure 26: Selected Tag
Note: Once a Tag is added for any particular parameter, that same tag cannot be reused for a different parameter i.e. a tag can only be used once.
Save:
Users must Save the changes by pressing the Save button.
Figure 27: Save Button.
A Message Toast with the message “The changes have been saved” is shown on Success
Figure 28: Save Success.
In case there are unsaved changes, an action dialog is shown while navigating to a different action as shown below. Select “Save” to save all new changes and “Discard Changes” to reset the changes.” :
Figure 29: Unsaved Changes Dialog.
Thanks for reading, and I would really appreciate your feedback. Please feel free to leave a comment in this blog post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
24 | |
23 | |
22 | |
14 | |
12 | |
10 | |
9 | |
7 | |
7 | |
6 |