{"components":{"schemas":{"AdherenceKpiView":{"additionalProperties":false,"properties":{"cumulativeDeviation":{"description":"Σ(misurato−pianificato)·Δt, Wh (segno generatore)","format":"double","type":"number"},"measurementUnit":{"type":"string"},"percent":{"description":"Aderenza al piano fino a now; null se non calcolabile","format":"double","type":["number","null"]}},"required":["percent","cumulativeDeviation","measurementUnit"],"type":"object"},"ApiSuccess_DispatchPlanDTO_":{"properties":{"data":{"$ref":"#/components/schemas/DispatchPlanDTO"},"status":{"default":true,"title":"Status","type":"boolean"}},"required":["data"],"title":"ApiSuccess[DispatchPlanDTO]","type":"object"},"ApiSuccess_EnvelopeDTO_":{"properties":{"data":{"$ref":"#/components/schemas/EnvelopeDTO"},"status":{"default":true,"title":"Status","type":"boolean"}},"required":["data"],"title":"ApiSuccess[EnvelopeDTO]","type":"object"},"ApiSuccess_list_Baseline__":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Baseline"},"title":"Data","type":"array"},"status":{"default":true,"title":"Status","type":"boolean"}},"required":["data"],"title":"ApiSuccess[list[Baseline]]","type":"object"},"AssetPlanDTO":{"properties":{"assetId":{"title":"Assetid","type":"string"},"baseline":{"$ref":"#/components/schemas/SignedProfile"},"kind":{"title":"Kind","type":"string"},"setpoint":{"$ref":"#/components/schemas/SignedProfile"},"socPlan":{"anyOf":[{"$ref":"#/components/schemas/BaseProfile"},{"type":"null"}]}},"required":["assetId","kind","baseline","setpoint"],"title":"AssetPlanDTO","type":"object"},"AssetStateView":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"bindings":{"additionalProperties":{"$ref":"#/components/schemas/BindingStateView"},"type":"object"},"kind":{"type":"string"}},"required":["assetId","kind","bindings"],"type":"object"},"BaseProfile":{"description":"Profilo a valori >=0 per semantica (es. socMin/Max, chargeMax).","properties":{"interval":{"default":0.25,"title":"Interval","type":"number"},"measurementUnit":{"title":"Measurementunit","type":"string"},"profile":{"items":{"$ref":"#/components/schemas/ProfileItem"},"title":"Profile","type":"array"},"profileType":{"$ref":"#/components/schemas/ProfileType"}},"required":["measurementUnit","profileType","profile"],"title":"BaseProfile","type":"object"},"Baseline":{"properties":{"assetId":{"title":"Assetid","type":"string"},"createdAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Createdat"},"interval":{"default":0.25,"title":"Interval","type":"number"},"metadata":{"additionalProperties":true,"default":{},"title":"Metadata","type":"object"},"profile":{"items":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":"Profile","type":"array"},"profileType":{"default":"ACTIVE_POWER","title":"Profiletype","type":"string"},"projectId":{"default":"","title":"Projectid","type":"string"},"quality":{"default":100,"title":"Quality","type":"number"},"season":{"$ref":"#/components/schemas/Season"},"type":{"$ref":"#/components/schemas/DayType"},"updatedAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updatedat"},"uuid":{"default":"","title":"Uuid","type":"string"},"validFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validfrom"},"validTo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validto"}},"required":["assetId","type","season","profile"],"title":"Baseline","type":"object"},"BatteryAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"kind":{"enum":["storage:battery"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"},"storage":{"$ref":"#/components/schemas/StorageCapability"}},"required":["storage","assetId","kind"],"type":"object"},"BindingStateView":{"additionalProperties":false,"properties":{"latest":{"$ref":"#/components/schemas/PointView","description":"Ultimo punto della finestra (null se serie vuota)"},"measurementUnit":{"description":"Unita' di misura (uom) dal deviceType IoT; assente se ignota","type":"string"},"points":{"description":"Serie nella finestra richiesta","items":{"$ref":"#/components/schemas/PointView"},"type":["array","null"]},"series":{"description":"URI della serie telemetrica (devices/{uuid}/{prop})","type":"string"}},"required":["series","latest","points"],"type":"object"},"CogeneratorAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"dispatchableGen":{"$ref":"#/components/schemas/DispatchableGenCapability"},"kind":{"enum":["programmableGeneration:fossilChp"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["dispatchableGen","assetId","kind"],"type":"object"},"ConnectionLimits":{"additionalProperties":false,"properties":{"maxExportActivePower":{"format":"double","type":"number"},"maxImportActivePower":{"format":"double","type":"number"}},"required":["maxImportActivePower","maxExportActivePower"],"type":"object"},"ConnectionLimitsDTO":{"properties":{"maxExportActivePower":{"title":"Maxexportactivepower","type":"number"},"maxImportActivePower":{"title":"Maximportactivepower","type":"number"}},"required":["maxImportActivePower","maxExportActivePower"],"title":"ConnectionLimitsDTO","type":"object"},"DayType":{"enum":["WORKDAY","HOLIDAY","PREHOLIDAY"],"title":"DayType","type":"string"},"DayTypeProfiles":{"additionalProperties":false,"properties":{"holiday":{"items":{"format":"double","type":["number","null"]},"type":["array","null"]},"preholiday":{"items":{"format":"double","type":["number","null"]},"type":["array","null"]},"workday":{"items":{"format":"double","type":["number","null"]},"type":["array","null"]}},"type":"object"},"DeferrableLoadDTO":{"properties":{"assetId":{"title":"Assetid","type":"string"},"maxAbsorbedActivePower":{"title":"Maxabsorbedactivepower","type":"number"},"requiredEnergy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Requiredenergy"},"windowEndIndex":{"title":"Windowendindex","type":"integer"},"windowStartIndex":{"title":"Windowstartindex","type":"integer"}},"required":["assetId","maxAbsorbedActivePower","windowStartIndex","windowEndIndex"],"title":"DeferrableLoadDTO","type":"object"},"DispatchPlanDTO":{"properties":{"assetPlans":{"items":{"$ref":"#/components/schemas/AssetPlanDTO"},"title":"Assetplans","type":"array"},"cost":{"anyOf":[{"$ref":"#/components/schemas/PlanCostDTO"},{"type":"null"}]},"deliveryDay":{"title":"Deliveryday","type":"string"},"horizon":{"$ref":"#/components/schemas/HorizonDTO"},"netPodActivePower":{"$ref":"#/components/schemas/SignedProfile"},"plantId":{"title":"Plantid","type":"string"},"status":{"title":"Status","type":"string"},"trackedCommitments":{"items":{"$ref":"#/components/schemas/TrackedCommitmentDTO"},"title":"Trackedcommitments","type":"array"}},"required":["plantId","deliveryDay","horizon","status","netPodActivePower","assetPlans","trackedCommitments"],"title":"DispatchPlanDTO","type":"object"},"DispatchableGenCapability":{"additionalProperties":false,"properties":{"maxInjectedActivePower":{"format":"double","type":"number"},"maxRampDownPower":{"format":"double","type":"number"},"maxRampUpPower":{"format":"double","type":"number"},"minInjectedActivePower":{"format":"double","type":"number"},"variableCost":{"format":"double","type":"number"}},"required":["minInjectedActivePower","maxInjectedActivePower","variableCost"],"type":"object"},"Edge":{"additionalProperties":false,"properties":{"edgeId":{"type":"string"},"kind":{"type":"string"},"source":{"type":"string"},"target":{"type":"string"}},"required":["edgeId","source","target","kind"],"type":"object"},"EnergyBalanceKpiView":{"additionalProperties":false,"properties":{"exported":{"description":"Wh immessi in rete","format":"double","type":"number"},"imported":{"description":"Wh prelevati dalla rete","format":"double","type":"number"},"measurementUnit":{"type":"string"},"peakWithdrawal":{"description":"Picco di prelievo, W (≥0)","format":"double","type":"number"},"selfConsumptionPercent":{"description":"100·(produzione−exported)/produzione; null se produzione 0","format":"double","type":["number","null"]}},"required":["imported","exported","selfConsumptionPercent","peakWithdrawal","measurementUnit"],"type":"object"},"EnvelopeDTO":{"properties":{"approximation":{"title":"Approximation","type":"string"},"baseline":{"$ref":"#/components/schemas/SignedProfile"},"chargeMax":{"$ref":"#/components/schemas/BaseProfile"},"connectionLimits":{"$ref":"#/components/schemas/ConnectionLimitsDTO"},"deferrableLoads":{"items":{"$ref":"#/components/schemas/DeferrableLoadDTO"},"title":"Deferrableloads","type":"array"},"deliveryDay":{"title":"Deliveryday","type":"string"},"dischargeMax":{"$ref":"#/components/schemas/BaseProfile"},"generatedAt":{"title":"Generatedat","type":"string"},"horizonStart":{"title":"Horizonstart","type":"string"},"interval":{"title":"Interval","type":"number"},"intervals":{"title":"Intervals","type":"integer"},"netPowerMax":{"$ref":"#/components/schemas/SignedProfile"},"netPowerMin":{"$ref":"#/components/schemas/SignedProfile"},"plantId":{"title":"Plantid","type":"string"},"pod":{"title":"Pod","type":"string"},"socMax":{"$ref":"#/components/schemas/BaseProfile"},"socMin":{"$ref":"#/components/schemas/BaseProfile"},"virtualBattery":{"$ref":"#/components/schemas/VirtualBatteryDTO"}},"required":["plantId","pod","deliveryDay","generatedAt","horizonStart","interval","intervals","approximation","connectionLimits","baseline","netPowerMin","netPowerMax","socMin","socMax","chargeMax","dischargeMax","virtualBattery","deferrableLoads"],"title":"EnvelopeDTO","type":"object"},"ErrorBody":{"additionalProperties":false,"properties":{"detail":{"type":"string"},"errors":{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":["array","null"]},"status":{"format":"int64","type":"integer"},"title":{"type":"string"}},"required":["status","title"],"type":"object"},"ErrorDetail":{"additionalProperties":false,"properties":{"location":{"description":"Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'","type":"string"},"message":{"description":"Error message text","type":"string"},"value":{"description":"The value at the given location"}},"type":"object"},"ErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"},"status":{"type":"boolean"}},"required":["status","error"],"type":"object"},"FixedLoadCapability":{"additionalProperties":false,"type":"object"},"FlexibleLoadCapability":{"additionalProperties":false,"properties":{"maxAbsorbedActivePower":{"format":"double","type":"number"},"maxRampDownPower":{"format":"double","type":"number"},"maxRampUpPower":{"format":"double","type":"number"},"minAbsorbedActivePower":{"format":"double","type":"number"},"requiredEnergy":{"format":"double","type":"number"},"windowEndIndex":{"format":"int64","type":"integer"},"windowStartIndex":{"format":"int64","type":"integer"}},"required":["minAbsorbedActivePower","maxAbsorbedActivePower","windowStartIndex","windowEndIndex"],"type":"object"},"GridConnectionNode":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"kind":{"enum":["grid:pod"],"type":"string"},"name":{"type":"string"},"pricing":{"$ref":"#/components/schemas/PodPricing"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["assetId","kind"],"type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"HorizonDTO":{"properties":{"interval":{"title":"Interval","type":"number"},"intervals":{"title":"Intervals","type":"integer"},"start":{"title":"Start","type":"string"}},"required":["start","interval","intervals"],"title":"HorizonDTO","type":"object"},"IntermittentGenCapability":{"additionalProperties":false,"properties":{"curtailable":{"type":"boolean"},"maxInjectedActivePower":{"format":"double","type":"number"}},"required":["curtailable"],"type":"object"},"KpisView":{"additionalProperties":false,"properties":{"adherence":{"$ref":"#/components/schemas/AdherenceKpiView"},"energyBalance":{"$ref":"#/components/schemas/EnergyBalanceKpiView"},"netPodActivePower":{"$ref":"#/components/schemas/NetPodKpiView"},"soc":{"$ref":"#/components/schemas/SocKpiView"}},"type":"object"},"NetPodKpiView":{"additionalProperties":false,"properties":{"measurementUnit":{"type":"string"},"value":{"description":"Netto POD misurato piu' recente, W (>0 immissione)","format":"double","type":"number"}},"required":["value","measurementUnit"],"type":"object"},"NonProgrammableLoadAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"fixedLoad":{"$ref":"#/components/schemas/FixedLoadCapability"},"kind":{"enum":["load:nonProgrammable"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["fixedLoad","assetId","kind"],"type":"object"},"PlanCostDTO":{"properties":{"adherencePenalty":{"title":"Adherencepenalty","type":"number"},"degradation":{"title":"Degradation","type":"number"},"energy":{"title":"Energy","type":"number"},"fuel":{"title":"Fuel","type":"number"},"total":{"title":"Total","type":"number"}},"required":["energy","fuel","degradation","adherencePenalty","total"],"title":"PlanCostDTO","type":"object"},"PlantBody":{"additionalProperties":false,"properties":{"balanceResourceId":{"description":"Link alla risorsa Balance; da qui si materializzano POD e connectionLimits","type":"string"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":["array","null"]},"iotPlantId":{"type":"string"},"layout":{"additionalProperties":{"$ref":"#/components/schemas/Position"},"type":"object"},"nodes":{"items":{"discriminator":{"mapping":{"demandSideResponse:industrial":"#/components/schemas/ProgrammableLoadAsset","grid:pod":"#/components/schemas/GridConnectionNode","load:nonProgrammable":"#/components/schemas/NonProgrammableLoadAsset","nonProgrammableGeneration:solarPv":"#/components/schemas/SolarPvAsset","programmableGeneration:fossilChp":"#/components/schemas/CogeneratorAsset","storage:battery":"#/components/schemas/BatteryAsset","storage:vehicleToGrid":"#/components/schemas/VehicleToGridAsset"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/BatteryAsset"},{"$ref":"#/components/schemas/VehicleToGridAsset"},{"$ref":"#/components/schemas/SolarPvAsset"},{"$ref":"#/components/schemas/CogeneratorAsset"},{"$ref":"#/components/schemas/ProgrammableLoadAsset"},{"$ref":"#/components/schemas/NonProgrammableLoadAsset"},{"$ref":"#/components/schemas/GridConnectionNode"}]},"type":"array"},"timezone":{"description":"Fuso del giorno-mercato (IANA, es. Europe/Rome)","type":"string"}},"required":["iotPlantId","nodes","edges"],"type":"object"},"PlantStateView":{"additionalProperties":false,"properties":{"asOf":{"description":"Istante di produzione della risposta (ISO 8601)","type":"string"},"assets":{"items":{"$ref":"#/components/schemas/AssetStateView"},"type":["array","null"]},"kpis":{"$ref":"#/components/schemas/KpisView","description":"KPI derivati per la Plant Overview (calcolati server-side sul giorno corrente); ogni blocco e' opzionale"},"plantId":{"type":"string"},"projectId":{"type":"string"},"warnings":{"description":"Degradazioni soft (es. uom non recuperabile, piano assente); i valori restano serviti","items":{"$ref":"#/components/schemas/WarningView"},"type":["array","null"]}},"required":["plantId","projectId","asOf","assets","warnings"],"type":"object"},"PlantView":{"additionalProperties":false,"properties":{"balanceResourceId":{"type":"string"},"balanceSyncedAt":{"description":"Ultimo riallineamento di POD/connectionLimits da Balance (assente se mai)","format":"date-time","type":"string"},"connectionLimits":{"$ref":"#/components/schemas/ConnectionLimits","description":"Balance-owned; materializzato dal link (read-only lato EMS-API)"},"createdAt":{"format":"date-time","type":"string"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":["array","null"]},"iotPlantId":{"type":"string"},"layout":{"additionalProperties":{"$ref":"#/components/schemas/Position"},"type":"object"},"nodes":{"items":{"discriminator":{"mapping":{"demandSideResponse:industrial":"#/components/schemas/ProgrammableLoadAsset","grid:pod":"#/components/schemas/GridConnectionNode","load:nonProgrammable":"#/components/schemas/NonProgrammableLoadAsset","nonProgrammableGeneration:solarPv":"#/components/schemas/SolarPvAsset","programmableGeneration:fossilChp":"#/components/schemas/CogeneratorAsset","storage:battery":"#/components/schemas/BatteryAsset","storage:vehicleToGrid":"#/components/schemas/VehicleToGridAsset"},"propertyName":"kind"},"oneOf":[{"$ref":"#/components/schemas/BatteryAsset"},{"$ref":"#/components/schemas/VehicleToGridAsset"},{"$ref":"#/components/schemas/SolarPvAsset"},{"$ref":"#/components/schemas/CogeneratorAsset"},{"$ref":"#/components/schemas/ProgrammableLoadAsset"},{"$ref":"#/components/schemas/NonProgrammableLoadAsset"},{"$ref":"#/components/schemas/GridConnectionNode"}]},"type":"array"},"pod":{"description":"Balance-owned; materializzato dal link (read-only lato EMS-API)","type":"string"},"projectId":{"type":"string"},"timezone":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"},"uuid":{"type":"string"}},"required":["uuid","projectId","iotPlantId","pod","connectionLimits","nodes","edges","createdAt","updatedAt"],"type":"object"},"PodPricing":{"additionalProperties":false,"properties":{"buy":{"$ref":"#/components/schemas/PricingProfile"},"sell":{"$ref":"#/components/schemas/PricingProfile"}},"type":"object"},"PointView":{"additionalProperties":false,"properties":{"time":{"type":"string"},"value":{"format":"double","type":"number"}},"required":["time","value"],"type":"object"},"Position":{"additionalProperties":false,"properties":{"x":{"format":"double","type":"number"},"y":{"format":"double","type":"number"}},"required":["x","y"],"type":"object"},"PricingProfile":{"additionalProperties":false,"properties":{"interval":{"format":"double","type":"number"},"priceCurrencyCode":{"type":"string"},"priceCurrencyPrefix":{"type":"string"},"priceMeasurementUnit":{"type":"string"},"profiles":{"$ref":"#/components/schemas/DayTypeProfiles"}},"required":["priceCurrencyCode","priceCurrencyPrefix","priceMeasurementUnit","interval","profiles"],"type":"object"},"ProfileItem":{"properties":{"index":{"title":"Index","type":"integer"},"value":{"title":"Value","type":"number"}},"required":["index","value"],"title":"ProfileItem","type":"object"},"ProfileType":{"enum":["ACTIVE_POWER","STORAGE_SOC"],"title":"ProfileType","type":"string"},"ProgrammableLoadAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"flexibleLoad":{"$ref":"#/components/schemas/FlexibleLoadCapability"},"kind":{"enum":["demandSideResponse:industrial"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["flexibleLoad","assetId","kind"],"type":"object"},"Season":{"enum":["WINTER","SPRING","SUMMER","AUTUMN"],"title":"Season","type":"string"},"SignedProfile":{"description":"Profilo a valori firmati (es. baseline, box netPowerMin/Max).","properties":{"interval":{"default":0.25,"title":"Interval","type":"number"},"measurementUnit":{"default":"W","title":"Measurementunit","type":"string"},"profile":{"items":{"$ref":"#/components/schemas/ProfileItem"},"title":"Profile","type":"array"},"profileType":{"$ref":"#/components/schemas/ProfileType"}},"required":["profileType","profile"],"title":"SignedProfile","type":"object"},"SocKpiView":{"additionalProperties":false,"properties":{"availableEnergy":{"description":"Energia utile corrente, Wh (E−Emin)","format":"double","type":"number"},"measurementUnit":{"type":"string"},"percent":{"description":"100·(E−Emin)/(Emax−Emin) aggregato sugli storage","format":"double","type":"number"}},"required":["percent","availableEnergy","measurementUnit"],"type":"object"},"SolarPvAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"intermittentGen":{"$ref":"#/components/schemas/IntermittentGenCapability"},"kind":{"enum":["nonProgrammableGeneration:solarPv"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["intermittentGen","assetId","kind"],"type":"object"},"StorageCapability":{"additionalProperties":false,"properties":{"chargeEfficiency":{"format":"double","type":"number"},"degradationCost":{"format":"double","type":"number"},"dischargeEfficiency":{"format":"double","type":"number"},"maxAbsorbedActivePower":{"format":"double","type":"number"},"maxEnergy":{"format":"double","type":"number"},"maxInjectedActivePower":{"format":"double","type":"number"},"maxRampDownPower":{"format":"double","type":"number"},"maxRampUpPower":{"format":"double","type":"number"},"minEnergy":{"format":"double","type":"number"},"selfDischargeActivePower":{"format":"double","type":"number"}},"required":["maxEnergy","minEnergy","maxAbsorbedActivePower","maxInjectedActivePower","chargeEfficiency","dischargeEfficiency"],"type":"object"},"SuccessEnvelopeListPlantView":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/PlantView"},"type":["array","null"]},"status":{"description":"Sempre true sui successi","type":"boolean"}},"required":["status","data"],"type":"object"},"SuccessEnvelopePlantStateView":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/PlantStateView"},"status":{"description":"Sempre true sui successi","type":"boolean"}},"required":["status","data"],"type":"object"},"SuccessEnvelopePlantView":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/PlantView"},"status":{"description":"Sempre true sui successi","type":"boolean"}},"required":["status","data"],"type":"object"},"TrackedCommitmentDTO":{"properties":{"plannedAdherence":{"title":"Plannedadherence","type":"number"},"serviceType":{"title":"Servicetype","type":"string"},"setpointId":{"title":"Setpointid","type":"string"},"windowEndIndex":{"title":"Windowendindex","type":"integer"},"windowStartIndex":{"title":"Windowstartindex","type":"integer"}},"required":["setpointId","serviceType","windowStartIndex","windowEndIndex","plannedAdherence"],"title":"TrackedCommitmentDTO","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"VehicleToGridAsset":{"additionalProperties":false,"properties":{"assetId":{"type":"string"},"defaultBaselines":{"additionalProperties":{"$ref":"#/components/schemas/DayTypeProfiles"},"type":"object"},"flexibleLoad":{"$ref":"#/components/schemas/FlexibleLoadCapability"},"kind":{"enum":["storage:vehicleToGrid"],"type":"string"},"name":{"type":"string"},"stateBindings":{"additionalProperties":{"type":"string"},"type":"object"},"storage":{"$ref":"#/components/schemas/StorageCapability"}},"required":["storage","flexibleLoad","assetId","kind"],"type":"object"},"VirtualBatteryDTO":{"properties":{"etaCharge":{"title":"Etacharge","type":"number"},"etaDischarge":{"title":"Etadischarge","type":"number"},"selfDischargeActivePower":{"title":"Selfdischargeactivepower","type":"number"},"socInit":{"title":"Socinit","type":"number"}},"required":["socInit","etaCharge","etaDischarge","selfDischargeActivePower"],"title":"VirtualBatteryDTO","type":"object"},"WarningView":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":"string"}},"required":["code"],"type":"object"}}},"info":{"description":"API pubbliche dell'Energy Management System Apio.\n\n- **Configurazione impianto** (`go-ems-api`): gemello digitale, anagrafica asset, stato corrente.\n- **Ottimizzazione** (`optimizer`): flexibility envelope, dispatch plan, baseline di previsione.\n\nTutte le risposte usano l'envelope Apio `{ status, data }` in caso di successo e `{ status: false, error }` in caso di errore. `projectId` e' la tenant key.","title":"Apio EMS — API pubbliche","version":"0.1.0"},"openapi":"3.1.0","paths":{"/ems/api/v1/projects/{projectId}/plants":{"get":{"operationId":"list-plants","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"description":"Filtra per IoT plant id","explode":false,"in":"query","name":"iotPlantId","schema":{"description":"Filtra per IoT plant id","type":"string"}},{"description":"Filtra per risorsa Balance","explode":false,"in":"query","name":"balanceResourceId","schema":{"description":"Filtra per risorsa Balance","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelopeListPlantView"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Elenca gli impianti del progetto","tags":["Plants"]},"post":{"operationId":"create-plant","parameters":[{"description":"Tenant key","in":"path","name":"projectId","required":true,"schema":{"description":"Tenant key","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlantBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelopePlantView"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Crea un impianto","tags":["Plants"]}},"/ems/api/v1/projects/{projectId}/plants/{plantId}":{"delete":{"operationId":"delete-plant","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"plantId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Elimina un impianto","tags":["Plants"]},"get":{"operationId":"get-plant","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"plantId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelopePlantView"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Leggi un impianto","tags":["Plants"]},"put":{"operationId":"update-plant","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"plantId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlantBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelopePlantView"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Aggiorna un impianto (sostituisce il grafo)","tags":["Plants"]}},"/ems/api/v1/projects/{projectId}/plants/{plantId}/state":{"get":{"operationId":"get-plant-state","parameters":[{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"plantId","required":true,"schema":{"type":"string"}},{"description":"ISO 8601 opzionale; se assente vale il default del Telemetry","explode":false,"in":"query","name":"timeFrom","schema":{"description":"ISO 8601 opzionale; se assente vale il default del Telemetry","type":"string"}},{"description":"ISO 8601 opzionale; se assente vale il default del Telemetry","explode":false,"in":"query","name":"timeTo","schema":{"description":"ISO 8601 opzionale; se assente vale il default del Telemetry","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelopePlantStateView"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"}},"summary":"Stato corrente dell'impianto (valori IoT degli state-binding) + KPI","tags":["Plants"]}},"/ems/optimizer/v1/projects/{project_id}/plants/{plant_id}/baselines":{"get":{"operationId":"read_baselines_v1_projects__project_id__plants__plant_id__baselines_get","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"title":"Project Id","type":"string"}},{"in":"path","name":"plant_id","required":true,"schema":{"title":"Plant Id","type":"string"}},{"in":"query","name":"day","required":true,"schema":{"title":"Day","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccess_list_Baseline__"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Baseline EMS per-asset del giorno (dayType/season derivati da day)","tags":["Baselines"]}},"/ems/optimizer/v1/projects/{project_id}/plants/{plant_id}/envelope":{"get":{"operationId":"get_envelope_v1_projects__project_id__plants__plant_id__envelope_get","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"title":"Project Id","type":"string"}},{"in":"path","name":"plant_id","required":true,"schema":{"title":"Plant Id","type":"string"}},{"in":"query","name":"day","required":true,"schema":{"title":"Day","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccess_EnvelopeDTO_"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Ultimo FlexibilityEnvelope del giorno","tags":["Envelope"]}},"/ems/optimizer/v1/projects/{project_id}/plants/{plant_id}/plan":{"get":{"operationId":"get_plan_v1_projects__project_id__plants__plant_id__plan_get","parameters":[{"in":"path","name":"project_id","required":true,"schema":{"title":"Project Id","type":"string"}},{"in":"path","name":"plant_id","required":true,"schema":{"title":"Plant Id","type":"string"}},{"in":"query","name":"day","required":true,"schema":{"title":"Day","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiSuccess_DispatchPlanDTO_"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Ultimo DispatchPlan del giorno","tags":["Plan"]}}},"servers":[{"description":"Ambiente dev","url":"http://api.dev.ems.apio.network"}],"tags":[{"name":"Baselines"},{"name":"Envelope"},{"name":"Plan"},{"name":"Plants"}],"x-tagGroups":[{"name":"Configurazione impianto","tags":["Plants"]},{"name":"Ottimizzazione","tags":["Envelope","Plan","Baselines"]}]}