Create Scenario
POST
/api/v1/projects/{project_id}/scenarios
const url = 'https://api.totalview.energy/api/v1/projects/example/scenarios';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scenario_name":"example","description":"example","clone_from_scenario_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","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 POST \ --url https://api.totalview.energy/api/v1/projects/example/scenarios \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scenario_name": "example", "description": "example", "clone_from_scenario_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "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 }'Create a new scenario variant for a project.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” project_id
required
Project Id
string
Request Body required
Section titled “Request Body required ” Media type application/json
ScenarioCreate
Request schema for creating a new scenario variant.
object
scenario_name
required
Scenario Name
string
Example generated
{ "scenario_name": "example", "description": "example", "clone_from_scenario_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "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": {} } ]}