Patch Project
const url = 'https://api.totalview.energy/api/v1/projects/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"project_name":"example","portfolio_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","latitude":1,"longitude":1,"state":"example","county":"example","city":"example","zip_code":"example","timezone":"example","project_nerc_code":"example","eia_ba_code":"example","cod_date":"2026-04-15T12:00:00Z","decommision_date":"2026-04-15T12:00:00Z","nameplate_capacity":1,"poi_limit":1,"project_additional_load":0,"existing_project_flag":true,"sam_profile_flag":true,"tech_type_id":"example","ppa_flag":true,"ppa_percentage":1,"ppa_capacity":1,"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,"battery_chemistry":"example","battery_calendar_life_years":1,"battery_cycle_life":1,"battery_augmentation_flag":true,"battery_depth_of_discharge":1,"gen_hour_profile_mw":[{"timestamp":"2026-04-15T12:00:00Z","value":1,"source":"example"}],"gen_aggregate_points":[{"period_start":"2026-04-15","period_end":"2026-04-15","sum_mwh":1,"granularity":"5min","source":"example"}],"auto_queue":true}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "project_name": "example", "portfolio_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "latitude": 1, "longitude": 1, "state": "example", "county": "example", "city": "example", "zip_code": "example", "timezone": "example", "project_nerc_code": "example", "eia_ba_code": "example", "cod_date": "2026-04-15T12:00:00Z", "decommision_date": "2026-04-15T12:00:00Z", "nameplate_capacity": 1, "poi_limit": 1, "project_additional_load": 0, "existing_project_flag": true, "sam_profile_flag": true, "tech_type_id": "example", "ppa_flag": true, "ppa_percentage": 1, "ppa_capacity": 1, "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, "battery_chemistry": "example", "battery_calendar_life_years": 1, "battery_cycle_life": 1, "battery_augmentation_flag": true, "battery_depth_of_discharge": 1, "gen_hour_profile_mw": [ { "timestamp": "2026-04-15T12:00:00Z", "value": 1, "source": "example" } ], "gen_aggregate_points": [ { "period_start": "2026-04-15", "period_end": "2026-04-15", "sum_mwh": 1, "granularity": "5min", "source": "example" } ], "auto_queue": true }'Partially update a project’s config.
- Only fields you include (non-None) are updated.
- Both the typed ORM columns and the
config_snapshotJSON blob are kept in sync so a subsequent/queuecall sees the new values. - If any results-affecting field changes,
statusis set to"config_updated"andresults_invalidated=trueis returned — latest run is now stale. - Pass
auto_queue=trueto immediately enqueue a fresh model run.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”Partial update schema for PATCH /projects/{project_id}. Only include fields you want to change.
object
Hourly generation profile entry.
The optional source field records the provenance of the value
(e.g., "metered", "sam_modeled", "gap_filled_zero").
The engine surfaces the per-source hour-count in the run summary’s
GenerationMetadata.profile_source_breakdown so reviewers can
audit which fraction of the profile is metered vs. simulated.
Source is opaque — any string is allowed.
A metered generation total over a time window.
Used when a customer can’t provide a full hourly profile but does
have aggregate totals (monthly settlement, daily SCADA export,
annual operational report). The engine combines these with a
SAM-generated 8760 shape — preserving the SAM diurnal/seasonal
pattern within each window while rescaling so the window sum
matches sum_mwh exactly.
source is a free-text provenance tag carried through to ISO
14040 disclosure (e.g., "settlement", "scada_export",
"operational_report").
Responses
Section titled “ Responses ”Successful Response
Response after patching a project.
object
object
Current configuration version
True if any patched field affects model results (latest run is now stale). Pass auto_queue=true to immediately re-run, or POST /queue when ready.
Fields actually changed by this PATCH (only those whose value differed).
Example
{ "config_version": 1, "results_invalidated": false}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}