RapidMiner

Passing parameters to Rapidminer Webservices

by RMStaff on ‎06-15-2016 06:51 AM - edited on ‎09-21-2016 10:45 AM by Community Manager

 

 

 

Rapidminer provides excellent capabilities to operationalize predictive analytics by simply converting RapidMiner workflows into webservice end points that can return data in various formats like XML, JSON, Odata, HTML and many other. Many a times there is a need to provide inputs to process when calling via webservice, This KB Article describes options and steps needed to provide parameters to web services.

 

The process to create web service from RapidMiner workflows is documented in this KB Article

 

Rapidminer webservice allows you to provide url based inputs that can affect

    • Macros
    • Operator Parameters

parameterbinding.png

This can be configured in the Edit Web service panel as seen above

 

Macro Binding

To map a url parameter to Query Parameter click on "Add Macro Binding"(Marked 1 above) 

In this case the url parameters "custid" is mapped to update the macro "Customerid"

Addtionally if you have already defined Macros in the process context then clicking on the "Copy from process context" will autofill the required parameter binding values. 

 

Operator parameter Binding

You can directly map a url parameter to a parameter for specific operator.  As seen below provide your url parameter name in place or "urlparam"

Provide your operator name in place of "operator_name" and the specific parameter in place of "operator_parameter"

parameterbinding2.png

 

You will also be able to specify if a particular parameter is mandatory or not, by clicking on the checkboxes next to each parameter binding.

 

Once completed hit the "Submit" button to save the configuration

 

An example of the request url in the case where you are mapping a macro and operator param will look like below.

 

http://myservername:port/api/rest/process/serviceid?custid=xxxx&urlparam=yyyyy