When creating the new scenario, send the scenario_id
of the scenario to be copied (the "source scenario") as part of the JSON body.
// POST /api/v3/scenarios HTTP/2
// Host: engine.energytransitionmodel.com
// Accept: */*
// Content-Type: application/json
{
"scenario": {
"scenario_id": ${SCENARIO_ID}
}
}
For example:
curl \
-X POST \
-H "Content-Type: application/json" \
-d '{ "scenario": { "scenario_id": 155680 } }' \
https://engine.energytransitionmodel.com/api/v3/scenarios
Where you would normally provide the input key and numeric value, instead provide the string "reset"
as the value.
// PUT /api/v3/scenarios/${SCENARIO_ID} HTTP/2
// Host: engine.energytransitionmodel.com
// Accept: */*
// Content-Type: application/json
{
"scenario": {
"user_values": {
"${INPUT_KEY}": "reset"
}
}
}
For example:
curl \
-X PUT \
-H "Content-Type: application/json" \
-d '{"scenario": { "user_values": { "buildings_insulation_level": "reset" } } }' \
https://engine.energytransitionmodel.com/api/v3/scenarios/760089
Note that if your scenario is a copy of another (i.e., it was created like "Create a copy of a scenario" describes, above), the input value will not be removed. Rather, it will be reset to the value contained in the source scenario.
Thanks for the support!