Assign Network & IP (Infoblox) - JSON Form
  • 18 Oct 2024
  • Dark
    Light
  • PDF

Assign Network & IP (Infoblox) - JSON Form

  • Dark
    Light
  • PDF

Article summary

We are ready to begin building our use-case, beginning with the JSON Form that will allow users to submit the information needed when running our automation.  

JSON Form Video

Step 1

From Automation Studio, select the in the left navigation panel.  The Create window will open.

 Step 2

From the dropdown, select JSON Form.  Name the form Lab – Assign Network and IP – Infoblox Form – XX and click Create.

Step 3

JSON Forms utilize a drag and drop interface.  Click to expand the Form Elements menu in the right navigation panel.  There are 7 types of form elements to choose from.   The first element our form will use is a Dropdown element.  Click and drag a Dropdown element to the canvas where you see the text Drop elements here.  When the element reaches the canvas, a red box will appear indicating where the element will be placed.

 Step 4

Once the element has been added to the form, an ellipses icon will appear in the top-right corner.   Hover your cursor over the ellipses icon and a gear icon will appear.  Click the gear icon to open the Configuration window.

Step 5

For the Label, enter Reservation Type.  We would like this element to be required, so we will select Yes for Required.  For the Placeholder, enter Select Reservation Type.  

 Step 6

Notice the warning telling us that Options are needed.  Dropdown elements require options as part of its configuration.  Select the +Options button in the bottom right of the configuration window. 

 Step 7

There are 2 options for dropdown values, Static and Dynamic.  Static options will not change once they are populated.  Dynamic options can change and are populated with an API request.   For this dropdown, we would like to use Static options.

Step 8

This dropdown will have 3 static values.  Click the +Option button 3 times to add 3 values.  The Option Value is the format the workflow needs in order to run.  Custom Label is optional and allows you to enter a user-friendly value in the dropdown.  For our dropdown, we will only use the required Option Value.  Enter the following values for the dropdown:  Application, Device, and Server.

 Step 9

Click Back.   Notice the options message has changed.   Click Save.  The dropdown has been configured.

Step 10

Add a second Dropdown element to the canvas and open the configuration window.

 Step 11

For the Label, enter Parent Network.  For Required, select Yes.  For the Placeholder, enter Select a Parent Network.  Click +Options.

 Step 12

For this dropdown, we will use an API call to populate our dropdown options.  Select Dynamic.

 Step 13

We need to configure the API call used to populate our Dropdown field.  For the Request Method, select POST.  For the Base URL, select /Infoblox.   For the API Route, select /listNetworkContainers.

 Step 14 

Copy the JSON data and paste it into the Request Body field.  Click Make API Call.  This will send the API Request and the response will appear in the Response Body field.

{
 "query":{ }
}

Step 15

Next, we need to choose which data point will be used for the values in the Data Mapping section.   For the Source Property, select /response.  For the Property Key, select /network.  Click Query Data.  The parent networks are shown and will be populated as the dynamic dropdown values.

Step 16

Click Back and then click Save.  The dropdown has been configured.

 Step 17

Add a Text Input element to the canvas and open the configuration window.

Step 18

For the Label, enter Hostname.  Select Yes for Required and update the Placeholder to Enter Hostname.  Click Save.

 Step 19

Our JSON Form is complete.   Click Save.

Step 20

We would like to preview the format of the data leaving the JSON Form.  Click the Preview icon.

 Step 21

Complete the form using any values and click Show Form Data.

Step 22

This is the format in which the data will be submitted when executing our automation in Operations Manager.  Hover your cursor next to the text 3 items and select the clipboard icon.  Paste the JSON text into a text editor, such as Notepad, for use in the next section of the training.

 Step 23

Click Close.

We know that users will be submitting data using our form, but when doing so, the values are not sent to the workflow individually as our workflow currently expects, they are sent in as a single variable called formData.  To handle this, we need to transform the data.  To do that, we will build a Transformation.

 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.