Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
iconfalse

To learn how to configure the JSON Tool plugin, see the KB page for JSON API Tool.

This plugin's configuration is identical, only with the additional configurable properties below.


Format Response

Info
titleImportant

You can only see this property if you select JSON for your Response Type.

NameDescription
Enable Response FormattingWhen checked, you can start writing a BeanShell script to format/post-process the JSON response.
Script

The "Enable Response Formatting" property must be enabled in order to write the BeanShell script here.

Injected Variables:

  • data - This is a Map object of the JSON response from the JSON API call.

Expected Return Object:

It is expected to return a Map object that would later on be processed as configured to store to form and/or workflow variables.

Example:

Return the response only for the first item in a JSON array with the object name "apps".

Code Block
languagejava
return data.get("apps")[0];

Figure 1: Enable Response Formatting

...