Update Scenario
PATCH
/api/v1/projects/{project_id}/scenarios/{scenario_id}
const url = 'https://api.totalview.energy/api/v1/projects/example/scenarios/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scenario_name":"example","description":"example","nameplate_capacity":1,"poi_limit":1,"tech_type_id":"example","cod_date":"2026-04-15T12:00:00Z","battery_flag":true,"battery_capacity_mwh":1,"battery_duration_hours":1,"battery_charge_rate_mw":1,"battery_discharge_rate_mw":1,"battery_round_trip_eff":1,"battery_soc_min":1,"ppa_flag":true,"ppa_percentage":1,"ppa_capacity":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.totalview.energy/api/v1/projects/example/scenarios/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scenario_name": "example", "description": "example", "nameplate_capacity": 1, "poi_limit": 1, "tech_type_id": "example", "cod_date": "2026-04-15T12:00:00Z", "battery_flag": true, "battery_capacity_mwh": 1, "battery_duration_hours": 1, "battery_charge_rate_mw": 1, "battery_discharge_rate_mw": 1, "battery_round_trip_eff": 1, "battery_soc_min": 1, "ppa_flag": true, "ppa_percentage": 1, "ppa_capacity": 1 }'Update scenario overrides and bump version.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” project_id
required
Project Id
string
scenario_id
required
Scenario Id
string
Request Body required
Section titled “Request Body required ” Media type application/json
ScenarioPatch
Partial update schema for PATCH /scenarios/{scenario_id}.
object
Example generated
{ "scenario_name": "example", "description": "example", "nameplate_capacity": 1, "poi_limit": 1, "tech_type_id": "example", "cod_date": "2026-04-15T12:00:00Z", "battery_flag": true, "battery_capacity_mwh": 1, "battery_duration_hours": 1, "battery_charge_rate_mw": 1, "battery_discharge_rate_mw": 1, "battery_round_trip_eff": 1, "battery_soc_min": 1, "ppa_flag": true, "ppa_percentage": 1, "ppa_capacity": 1}Responses
Section titled “ Responses ”Successful Response
Media type application/json
ScenarioOut
Response schema for a scenario.
object
scenario_id
required
Scenario Id
string format: uuid
project_id
required
Project Id
string format: uuid
scenario_name
required
Scenario Name
string
config_snapshot
Config Snapshot
object
key
additional properties
any
is_default
Is Default
boolean
scenario_version
Scenario Version
integer
Example
{ "is_default": false, "scenario_version": 1}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}