Energy Site Management

The service offers a set of site management operations on the EnergySites endpoint. This method allows the client to generate a list of the sites associated with their license, request detailed information about specific solar sites, and set a site’s attributes or specifications. The response to each request depends on the specific operation. The response can be a single EnergySiteId, a list of EnergySiteIds or a full site specification.

EnergySite Operations

Create a solar energy site under your license using the EnergySites service endpoint. This will return an EnergySiteId. Visit EnergySiteCreateRequest for more energy site examples.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
<EnergySite Name="Sample Residential Site" Description="Sample Residential Site">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="85.00">
    <Inverters>
     <Inverter Count="1" MaxPowerOutputAC_kW="4.470000" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="20" NameplateDCRating_kW="0.22000" PtcRating_kW="0.19760" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" />
      </PvModules>
      <ArrayConfiguration Tracking="Fixed" Tilt_Degrees="34.65" Azimuth_Degrees="180.000"/>
      <SolarObstructions>
       <SolarObstruction Opacity_Percent="80.0" Azimuth_Degrees="90.000" Elevation_Degrees="33.000" />
       <SolarObstruction Opacity_Percent="100.0" Azimuth_Degrees="120.000" Elevation_Degrees="50.000" />
       <SolarObstruction Opacity_Percent="100.0" Azimuth_Degrees="150.000" Elevation_Degrees="22.000" />
       <SolarObstruction Opacity_Percent="100.0" Azimuth_Degrees="180.000" Elevation_Degrees="3.000" />
       <SolarObstruction Opacity_Percent="100.0" Azimuth_Degrees="210.000" Elevation_Degrees="1.000" />
       <SolarObstruction Opacity_Percent="100.0" Azimuth_Degrees="240.000" Elevation_Degrees="2.000" />
       <SolarObstruction Opacity_Percent="70.0" Azimuth_Degrees="270.000" Elevation_Degrees="4.000" />
      </SolarObstructions>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url,auth = HTTPBasicAuth(userName,password),
           data=payload,headers=headers,params=querystring)

print(response.text)
import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Basic fixed tilt commercial scale PV system">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="86.00">
    <Inverters>
     <Inverter Count="3" MaxPowerOutputAC_kW="166.7" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="165" NameplateDCRating_kW="0.33" PtcRating_kW="0.3054" PowerTemperatureCoefficient_PercentPerDegreeC="0.4"/>
      </PvModules>
      <ArrayConfiguration Tracking="Fixed" Azimuth_Degrees="180.000" Tilt_Degrees="34.65" ModuleRowCount="4" />
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url,auth = HTTPBasicAuth(userName,password),
           data=payload,headers=headers,params=querystring)

print(response.text)
import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteCreateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Basic fixed tilt utility-scale PV system">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="86.00">
    <Inverters>
     <Inverter Count="12" MaxPowerOutputAC_kW="4166.7" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="16500" NameplateDCRating_kW="0.33" PtcRating_kW="0.3054" PowerTemperatureCoefficient_PercentPerDegreeC="0.4"/>
      </PvModules>
      <ArrayConfiguration Tracking="SingleAxisWithBacktracking" Azimuth_Degrees="180.000" Tilt_Degrees="0.00" ModuleRowCount="25" TrackingRotationLimit_Degrees="60" RelativeRowSpacing="3"/>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteCreateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url,auth = HTTPBasicAuth(userName,password),
           data=payload,headers=headers,params=querystring)

print(response.text)

Here is an example of the EnergySiteCreateResponse XML returned by an EnergySiteCreateRequest. The response will contain a unique EnergySiteId that the client can then use to reference the specific site when updating the energy site, requesting the details for the energy site, or requesting simulated PV output.

<EnergySiteCreateResponse RequestId="W19PR1UKF" EnergySiteId="NZ3RTPHLJE"
 xmlns="http://service.solaranywhere.com/api/v2" />

Update a solar energy site using the EnergySiteId, providing updated site specifications.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
userName = "your_username@your_company.com"
password = "your password"
EnergySiteId = "your_site_id"

querystring = {"key":"your_client_key"}

payload = """<EnergySiteUpdateRequest xmlns="http://service.solaranywhere.com/api/v2">
 <EnergySite Name="Sample Site" Description="Basic Single-Axis Tracking with Backtracking Utility Scale PV System">
  <Location Latitude="34.65" Longitude="-119.10" />
  <PvSystems>
   <PvSystem Albedo_Percent="17" GeneralDerate_Percent="86.00">
    <Inverters>
     <Inverter Count="10" MaxPowerOutputAC_kW="4166.67" EfficiencyRating_Percent="97.000000" />
    </Inverters>
    <PvArrays>
     <PvArray>
      <PvModules>
       <PvModule Count="100" NameplateDCRating_kW="500.000" PtcRating_kW="482.000" PowerTemperatureCoefficient_PercentPerDegreeC="0.4" />
      </PvModules>
      <ArrayConfiguration Tracking="SingleAxisWithBacktracking" TrackingRotationLimit_Degrees="60" Tilt_Degrees="0.00" Azimuth_Degrees="180.000" RelativeRowSpacing="3" ModuleRowCount="25"/>
     </PvArray>
    </PvArrays>
   </PvSystem>
  </PvSystems>
 </EnergySite>
</EnergySiteUpdateRequest>"""

headers = {
  'content-type': "text/xml; charset=utf-8",
  'content-length': "length",
  }

response = requests.post(url + EnergySiteId, auth = HTTPBasicAuth(userName,password),
      data=payload,headers=headers,params=querystring)

print(response.text)

Request the list of solar energy sites assigned to your license.

To display a high volume of energy sites, there is an option to specify the PageSize in the URL: https://service.solaranywhere.com/api/v2/EnergySites?PageSize=100&PageIndex=0
import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites"
userName = "your_username@your_company.com"
password = "your_password"

querystring = {"key":"your_client_key"}

response = requests.get(url, auth=HTTPBasicAuth(userName,password), params=querystring)

print(response.text)

Request the specifications for an existing solar site using the EnergySiteId.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v2/EnergySites/"
userName = "your_username@your_company.com"
password = "your_password"
EnergySiteId = "your_site_id"

querystring = {"key":"your_client_key"}

response = requests.get(url + EnergySiteId,auth = HTTPBasicAuth(userName,password),
           params=querystring)

print(response.text)

What’s Next?