Solar Installations

Share data about solar installations.

Create a New Installation

HTTP POST http://api.opensolar.org/V1/installation

Example JSON passed in via POST

{
    "installation":
    {
	"location":
	{
	    "postalAddress":"500 West 45th Street, New York, NY 10036",
	    "geoPt":
	    {
		"lat":40.75,
		"lon":-74.0
	    },
	    "private":false
	},
	"watts":2200,
	"cost":23334,
	"incentives":4524,
	"completed":"2008-02-26 12:00:00",
	"installer":"http:\/\/api.opensolar.org\/V1\/provider\/1234",	
	"seller":"http:\/\/api.opensolar.org\/V1\/provider\/1234",
	"pvManufacturer":"http:\/\/api.opensolar.org\/V1\/provider\/8765",
	"pvModel":"http:\/\/api.opensolar.org\/V1\/product\/9874",
	"inverterManufacturer":"http:\/\/api.opensolar.org\/V1\/provider\/8765",
	"inverterModel":"http:\/\/api.opensolar.org\/V1\/product\/9874",
	"monitoringProvider":"FS",	
	"monitoringAccount":"2349823",	
	"description":"This is my pride and joy.",     
	"creatorRelationship":"installer",
	"owner":"http:\/\/api.opensolar.org\/V1\/user\/woollymammoth"	
    }
}

Required Fields

The following fields are required at a minimum for this request to be successful:

{
    "installation":
    {
	"location":
	{
	    "postalAddress":"500 West 45th Street, New York, NY 10036",
	    "geoPt":
	    {
		"lat":40.75,
		"lon":-74.0
	    },
	    "private":false
	}
    }
}

Response

If the request is successful, the API will return the HTTP 201 (Created) status code containing a Location header pointing to the URI of this newly created resource.

Example

Location: http://api.opensolar.org/V1/installation/1234

If there has been an error, the service will return the appropriate HTTP status code - most likely a 400 (Bad Request), 401 (Unauthorized) or 403 (Forbidden) error. See the Developer Authorization page for details on how to submit authenticated API requests.


Update an Existing Installation

HTTP POST http://api.opensolar.org/V1/installation/1234

Where 1234 is the ID of the installation that you are trying to modify.

The method will overwrite any root element that you pass in.

Example

Posting the following piece of JSON to http://api.opensolar.org/V1/installation/1234 would overwrite these six fields for installation 1234.

{
    "installation":
    {
	"pvManufacturer":"http:\/\/api.opensolar.org\/V1\/provider\/8765",
	"pvModel":"http:\/\/api.opensolar.org\/V1\/product\/9874",
	"inverterManufacturer":"http:\/\/api.opensolar.org\/V1\/provider\/8765",
	"inverterModel":"http:\/\/api.opensolar.org\/V1\/product\/9874",
	"monitoringProvider":"FS",	
	"monitoringAccount":"2349823"	
    }
}