URL Params
Required: None
Optional: Any data component may be passed as a query parameter if a binding property exists for that parameter. For example, see the RASON example code snippet below.
data: {
profits: {
value: [[75, 50, 35]],
binding: 'get'
}
To change a query parameter outside of the RASON model environment, use:
$.Post("https://rason.net/api/optimize?profits=100,150,75",...
RASON Server will map "profits=?" with "profits = 100, 150, 75". A query can return any number of rows that satisfy the filtering condition, from 0 to infinity.
To perform a query using multiple parameters (say custID, maritalStatus and age) outside of the RASON model environment, use the query parameter:
$.get(https://rason.net/api/decision? custID=c2&maritalStatus=s&age=40 .....
Or in general,
$.get(https://rason.net/api/decision?par1=val1&par2=val2.....
In a data science model, any datasource component may be passed as a query parameter if a binding property exists for that datasource. For example, see the RASON example code snippet below.
"datasources": {
"srcCustomers": {
"type": "csv",
"connection": "customers_dt.txt",
"selection": "custID = $parCustID1 or custID = $parCustID2",
"parameters": {
"parCustID1": {
"binding": "get",
"value": "c1"
},
"parCustID2": {
"binding": "get",
"value": "c3"
}
}
}
},
To query custID =$parCustID1 or custID=$parCustID2 outside of the RASON model environment, use:
$.get(https://rason.net/api/datamine?parCustID1=c1&parCustID2=c2…
Or in general,
$.get(https://rason.net/api/datamine?par1=val1&par2=val2.....
RASON Server will map "custID=$parCustID1" with "parCustID1=c1" and "custID = $parCustID2" with "parCustID2=c3". A query can return any number of rows that satisfy the filtering condition, from 0 to infinity.