Using Get Method - Decision Model

Configuring the ML server and the ML model as a web service creates the REST API URL that is displayed in the Model Input field. Send the inputs to the ML model by adding the input fields to the ML model REST API URL.

 

 

Do one of the following:

·       In the Model Input field, add the input fields directly to the REST API URL of the selected ML model web service.

OR

 

·       Add the input fields one by one in the Key Value screen that automatically gets converted to the URL format.

1.    Click the (Add) icon to add input data for all the URL query parameters. By default, a single field entry is already available .

2.    In the Parameter Name field, enter a display name of your choice.

3.    In the Parameter Value list, select the relevant parameter holding the value of the input data. You must predefine the parameters and their respective values in the Parameter bar to use this option. Alternatively, select the check box available beside the Parameter Value field and enter an input value that you want to set as the default value.

4.    Repeat steps i through step iii to add inputs for all URL query parameters.

 

 

a.    In the Model Response list, select the parameter to store the JSON response.

b.    You can use the X icon to delete the added input field.

c.     Click Advanced Settings to update the request method, request header and to capture the response header if required.  The Advanced Settings dialog box appears.

 

 

d.    In the Request Method list, select POST if you want to change the request method.

e.    The Accept and Content-Type header details that are added in Headers section while configuring the ML server in the Admin menu of Automation Studio auto populates in the Model Headers screen, as shown in the below screen shot. This lets you inherit the information related to the ML model REST API request and response. By default, JSON format is supported if the headers are not defined.

 

 

f.      You can manually add headers by clicking the (Add) icon as per your requirement.

 

 

 

g.    In the Header Name field, enter the name of the header.

h.    In the Header Value field, select the relevant parameter holding the value of the specified header. You must predefine the parameter and the respective value in the Parameter bar to use this option. Alternatively, select the check box available beside the Header Value field and enter the header value that you want to set as the default value. 

i.      Repeat step x to step xii to add multiple headers.

j.      You can use the X icon to delete the added headers.

k.    In the Response Header list, select the parameter to store the header response.

l.      Click SAVE.

m.  Close the Model Inputs and Response (GET) dialog box.

The Get method of retrieving the predictions is configured. The JSON activity can then be used to retrieve the required output fields from the ML model response JSON and configure the automation process flow accordingly.

 

 Related Topics

Decision Workbench

Step-By-Step Guide to Use Decision Model and Decision Workbench to Predict Whether