To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
HTTP + XML
The following are sample HTTP requests and responses.
The placeholders shown need to be replaced with actual values.
POST /optimizer/tod HTTP/1.1
Host: dev-optimization.power.dev
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<TODOptimizerRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Optimization.ServiceModel">
<AcCablingLosses xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</AcCablingLosses>
<ApiActionId xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">00000000-0000-0000-0000-000000000000</ApiActionId>
<BatteryCapacity xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</BatteryCapacity>
<CapacitySchedule i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models" />
<ChargeDischargeLimit xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</ChargeDischargeLimit>
<ChargeEfficiency xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</ChargeEfficiency>
<Data i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models" />
<DischargeEfficiency xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</DischargeEfficiency>
<EnableCapacity xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">false</EnableCapacity>
<EnergySchedule i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models" />
<HVACLosses xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</HVACLosses>
<OtherLosses xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</OtherLosses>
<ParaciticLossesOperation xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</ParaciticLossesOperation>
<ParaciticLossesResting xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</ParaciticLossesResting>
<ProjectId xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">00000000-0000-0000-0000-000000000000</ProjectId>
<ThermalLosses xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</ThermalLosses>
<TransformatorLosses xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</TransformatorLosses>
<UnavailabilityLoss xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">0</UnavailabilityLoss>
<YoyFactors i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models" />
</TODOptimizerRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<TodOptimizerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/powerDev.Common.Models">
<ApiActionId>00000000-0000-0000-0000-000000000000</ApiActionId>
<Message>String</Message>
<Status>Undefined</Status>
<TestItems>
<TodOptimizerResponseItem>
<CapacityPrice>0</CapacityPrice>
<EnergyPrice>0</EnergyPrice>
<Hour>0</Hour>
<Month>0</Month>
<WeekDay>0</WeekDay>
<Year>0</Year>
<ChargeRate>0</ChargeRate>
<ChargeState>0</ChargeState>
<Charging>0</Charging>
<Loss>0</Loss>
</TodOptimizerResponseItem>
</TestItems>
</TodOptimizerResponse>