Generate Query JST from Object
Table of Contents
- Overview
- Installation Prerequisites
- How to Install
- How to Run
- Attributes
- Examples
- Additional Information
Overview
This pre-built allows IAP users to pass in an object and generate a JST that queries out individual items in the object which can then be used in IAP as a replacement for query tasks. At the time of publishing, only items in the first level of the object are exposed by the generated JST.
Installation Prerequisites
Users must satisfy the following prerequisites:
- Itential Automation Platform:
^2022.1
How to Install
To install the pre-built:
- Verify you are running a supported version of the Itential Automation Platform (IAP) as listed above in the Prerequisites section.
- The pre-built can be installed from within
App-Admin_Essential
. Simply search for the name of your desired pre-built and click the install button (as shown below).
How to Run
Use the following to run the pre-built:
- Once the pre-built is installed as outlined in the How to Install section above, go to
Automation Catalog
and run theGenerate Query JST
automation. In theEnter name for the JST
field, enter the name for the generated JST and in theEnter the Object
, enter the object for which you want to create the JST and click onVIEW JOB
.
Here's an example for what a user might send in:
Enter name for the JST |
testJST |
Enter the Object |
{
"name": "John",
"age": 23,
"location": "Atlanta"
}
|
- In the job, click on the
WORK TASK
button that would have popped up, to view the generated JST and copy/save it to a file on your local system.
- Now navigate to the workflow where you would like to query the items out of the object, add a
JSON Transformation
task and import the saved JST into IAP.
- Each of the items in original object should be accessible in all of the subsequent tasks of the workflow
Attributes
Attributes for the pre-built are outlined in the following tables.
- Input:
Attribute | Description | Type |
---|---|---|
Enter name for the JST |
Enter the name that you want the generated JST to be called | string |
Enter the Object |
Enter the object for which you want to create the query JST | object |
- Output:
Attribute | Description | Type |
---|---|---|
createdJST |
The generated query JST for the input object | object |
Examples
Examples describing how the pre-built will work for different inputs.
Example 1. Input:
{
"data": {
"fruit": "apple",
"price": "42.2",
"type": "fruit"
},
"jstName": "details"
}
Example 1. Output (If imported into the JST designer, the JST will look like this):
Example 2. Input - Showing support for only the first level of items:
{
"data": {
"healthcheckVariables": {
"numberOfRetries": 10,
"numberOfRetriesStability": 10,
"secondsBetweenRetry": 60
},
"mode": "Verbose",
"iosDeviceHostname": "csr100v-03.10.03S",
"release": "csr1000v-universalk9.03.10.03.S.153-3.S3-ext.SPA.bin"
},
"jstName": "device"
}
Example 2. Output (If imported into the JST designer, the JST will look like this):
Additional Information
Please use your Itential Customer Success account if you need support when using this Pre-Built Transformation.