Simulation API
The EqualTo Sheets "Simulation API" allows you to run "what-if" scenarios against a workbook. For example, if you want to know what the value of Sheet1!A1
would be if Sheet1!B1
is 100.0
, then the Simulation can provide the answer.
Note that the Simulation API does not modify the underlying workbook.
/api/v1/simulate/{workbook_id}
Supports either GET
or POST
Parameters:
inputs
: specify the input values in the simulation.{<sheet name>: {<cell ref>: <value>}}
Example:
{"Sheet1":{"A1": 100}}
outputs
: specify the output cells to retrieve as part of the simulation{<sheet name>: [<cell ref|range>]}
Example:
{"Sheet1":["B1", "C2:D3"]}
Note that you'll need to URL encode parameters in a GET
request.
Example curl
invocation to simulate Sheet1!C16
if Sheet1!C6=50000
:
curl 'https://sheets.equalto.com/api/v1/workbooks/<workbook id>/simulate?inputs=%7B%22Sheet1%22%3A%7B%22C6%22%3A50000%7D%7D&outputs=%7B%22Sheet1%22%3A%5B%22C16%22%5D%7D' \
-H 'Authorization: Bearer <license key>'
The request response will contain the values requested by the outputs
parameter.
Last updated