Scenarios
Before using the functions on this page, you may find it useful to review the following information:
The list of all functions is here.
Description of this function | Get a list of scenarios within the current case as JSON |
---|---|
List of functions |
|
/service/getScenarios
function – Get a list of scenarios in the currently selected case
Once a case is selected, the user can get a list of scenarios within that case by calling code similar to the following:
function OnGetScenarios() {
OnGetJson('/service/getscenarios', {});
}
A sample return from calling this function is as follows. The returned guid
parameter only has a value if the corresponding scenario has been solved, and must be used for any subsequent API calls to obtain the results of that solve. If the guid
is blank, it means that no results are available for that scenario (i.e., the user needs to first solve the case to get results).
[
{
"scenarioName": "Keep super & Buy property",
"guid": "5736d816-5ae3-4f7e-8727-52ffb154dc4b",
"analysisYears": 20
},
{
"scenarioName": "New SMSF w Property",
"guid": "",
"analysisYears": 20
},
{
"scenarioName": "Basic cash flows",
"guid": "",
"analysisYears": 20
}
]