Update Site
import requests
url = "https://api.rebase.energy/platform/v2/sites/{site_id}"
payload = {
"name": "My site",
"latitude": 52.5,
"longitude": 13.4,
"settings": {
"model_resolution": "1h",
"additional_points": [],
"trainLongTermModels": False,
"trainNearTermModels": True,
"quantileModels": [],
"usePhysicalModels": True,
"weather_models": [],
"create_params": {},
"metadata": {},
"forecast_max_value": 123
},
"type": "<string>",
"assets": [
{
"capacity": 1000,
"install_date": "2020-01-01",
"azimuth": 180,
"tilt": 30,
"mount": "fixed"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.rebase.energy/platform/v2/sites/{site_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My site",
"latitude": 52.5,
"longitude": 13.4,
"settings": {
"model_resolution": "1h",
"additional_points": [],
"trainLongTermModels": false,
"trainNearTermModels": true,
"quantileModels": [],
"usePhysicalModels": true,
"weather_models": [],
"create_params": {},
"metadata": {},
"forecast_max_value": 123
},
"type": "<string>",
"assets": [
{
"capacity": 1000,
"install_date": "2020-01-01",
"azimuth": 180,
"tilt": 30,
"mount": "fixed"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My site',
latitude: 52.5,
longitude: 13.4,
settings: {
model_resolution: '1h',
additional_points: [],
trainLongTermModels: false,
trainNearTermModels: true,
quantileModels: [],
usePhysicalModels: true,
weather_models: [],
create_params: {},
metadata: {},
forecast_max_value: 123
},
type: '<string>',
assets: [
{
capacity: 1000,
install_date: '2020-01-01',
azimuth: 180,
tilt: 30,
mount: 'fixed'
}
]
})
};
fetch('https://api.rebase.energy/platform/v2/sites/{site_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rebase.energy/platform/v2/sites/{site_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My site',
'latitude' => 52.5,
'longitude' => 13.4,
'settings' => [
'model_resolution' => '1h',
'additional_points' => [
],
'trainLongTermModels' => false,
'trainNearTermModels' => true,
'quantileModels' => [
],
'usePhysicalModels' => true,
'weather_models' => [
],
'create_params' => [
],
'metadata' => [
],
'forecast_max_value' => 123
],
'type' => '<string>',
'assets' => [
[
'capacity' => 1000,
'install_date' => '2020-01-01',
'azimuth' => 180,
'tilt' => 30,
'mount' => 'fixed'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rebase.energy/platform/v2/sites/{site_id}"
payload := strings.NewReader("{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.rebase.energy/platform/v2/sites/{site_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rebase.energy/platform/v2/sites/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Site
Update Site
Update the information of a site, e.g. name, assets
PUT
/
platform
/
v2
/
sites
/
{site_id}
Update Site
import requests
url = "https://api.rebase.energy/platform/v2/sites/{site_id}"
payload = {
"name": "My site",
"latitude": 52.5,
"longitude": 13.4,
"settings": {
"model_resolution": "1h",
"additional_points": [],
"trainLongTermModels": False,
"trainNearTermModels": True,
"quantileModels": [],
"usePhysicalModels": True,
"weather_models": [],
"create_params": {},
"metadata": {},
"forecast_max_value": 123
},
"type": "<string>",
"assets": [
{
"capacity": 1000,
"install_date": "2020-01-01",
"azimuth": 180,
"tilt": 30,
"mount": "fixed"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)curl --request PUT \
--url https://api.rebase.energy/platform/v2/sites/{site_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My site",
"latitude": 52.5,
"longitude": 13.4,
"settings": {
"model_resolution": "1h",
"additional_points": [],
"trainLongTermModels": false,
"trainNearTermModels": true,
"quantileModels": [],
"usePhysicalModels": true,
"weather_models": [],
"create_params": {},
"metadata": {},
"forecast_max_value": 123
},
"type": "<string>",
"assets": [
{
"capacity": 1000,
"install_date": "2020-01-01",
"azimuth": 180,
"tilt": 30,
"mount": "fixed"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My site',
latitude: 52.5,
longitude: 13.4,
settings: {
model_resolution: '1h',
additional_points: [],
trainLongTermModels: false,
trainNearTermModels: true,
quantileModels: [],
usePhysicalModels: true,
weather_models: [],
create_params: {},
metadata: {},
forecast_max_value: 123
},
type: '<string>',
assets: [
{
capacity: 1000,
install_date: '2020-01-01',
azimuth: 180,
tilt: 30,
mount: 'fixed'
}
]
})
};
fetch('https://api.rebase.energy/platform/v2/sites/{site_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rebase.energy/platform/v2/sites/{site_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My site',
'latitude' => 52.5,
'longitude' => 13.4,
'settings' => [
'model_resolution' => '1h',
'additional_points' => [
],
'trainLongTermModels' => false,
'trainNearTermModels' => true,
'quantileModels' => [
],
'usePhysicalModels' => true,
'weather_models' => [
],
'create_params' => [
],
'metadata' => [
],
'forecast_max_value' => 123
],
'type' => '<string>',
'assets' => [
[
'capacity' => 1000,
'install_date' => '2020-01-01',
'azimuth' => 180,
'tilt' => 30,
'mount' => 'fixed'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.rebase.energy/platform/v2/sites/{site_id}"
payload := strings.NewReader("{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.rebase.energy/platform/v2/sites/{site_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rebase.energy/platform/v2/sites/{site_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My site\",\n \"latitude\": 52.5,\n \"longitude\": 13.4,\n \"settings\": {\n \"model_resolution\": \"1h\",\n \"additional_points\": [],\n \"trainLongTermModels\": false,\n \"trainNearTermModels\": true,\n \"quantileModels\": [],\n \"usePhysicalModels\": true,\n \"weather_models\": [],\n \"create_params\": {},\n \"metadata\": {},\n \"forecast_max_value\": 123\n },\n \"type\": \"<string>\",\n \"assets\": [\n {\n \"capacity\": 1000,\n \"install_date\": \"2020-01-01\",\n \"azimuth\": 180,\n \"tilt\": 30,\n \"mount\": \"fixed\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Your API key. This is required to access our API programatically. You can view your API key in the Rebase dashboard.
Path Parameters
Body
application/json
- SolarSiteItem
- WindSiteItem
- LoadSiteItem
Example:
"My site"
Required range:
-90 <= x <= 90Example:
52.5
Required range:
-180 <= x <= 180Example:
13.4
Show child attributes
Show child attributes
Allowed value:
"solar"Minimum array length:
1- PVAssetFixed
- PVAssetSingleAxis
- PVAssetDualAxis
Show child attributes
Show child attributes
Response
Successful Response
⌘I