Predictions
Get albedo data for a prediction
Retrieves monthly albedo data for the prediction from NSRDB/NASA. Used for bifacial calculations.
Parameters:
-
projectId(path, required): The project ID. -
predictionId(path, required): The prediction ID.
GET
/
Project
/
{projectId}
/
Prediction
/
{predictionId}
/
GetAlbedoData
Get albedo data for a prediction
curl --request GET \
--url https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData', 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.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 24929003,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2,
"albedo": 0.6435,
"spectralShift": 1
},
{
"id": 24929004,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2,
"albedo": 0.5389,
"spectralShift": 1
},
{
"id": 24929005,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2,
"albedo": 0.3216,
"spectralShift": 1
},
{
"id": 24929006,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2,
"albedo": 0.1793,
"spectralShift": 1
},
{
"id": 24929007,
"month": 5,
"monthName": "May",
"soilingLoss": 2,
"albedo": 0.1323,
"spectralShift": 1
},
{
"id": 24929008,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2,
"albedo": 0.14,
"spectralShift": 1
},
{
"id": 24929009,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2,
"albedo": 0.14,
"spectralShift": 1
},
{
"id": 24929010,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2,
"albedo": 0.1387,
"spectralShift": 1
},
{
"id": 24929011,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2,
"albedo": 0.1353,
"spectralShift": 1
},
{
"id": 24929012,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2,
"albedo": 0.13,
"spectralShift": 1
},
{
"id": 24929013,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2,
"albedo": 0.204,
"spectralShift": 1
},
{
"id": 24929014,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2,
"albedo": 0.4829,
"spectralShift": 1
}
]"Project not found.""An error has occurred."Authorizations
Pass Authorization: Bearer <token> on every request. See the Authentication section of the API description for how to fetch a token.
⌘I
Get albedo data for a prediction
curl --request GET \
--url https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData', 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.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction/{predictionId}/GetAlbedoData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 24929003,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2,
"albedo": 0.6435,
"spectralShift": 1
},
{
"id": 24929004,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2,
"albedo": 0.5389,
"spectralShift": 1
},
{
"id": 24929005,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2,
"albedo": 0.3216,
"spectralShift": 1
},
{
"id": 24929006,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2,
"albedo": 0.1793,
"spectralShift": 1
},
{
"id": 24929007,
"month": 5,
"monthName": "May",
"soilingLoss": 2,
"albedo": 0.1323,
"spectralShift": 1
},
{
"id": 24929008,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2,
"albedo": 0.14,
"spectralShift": 1
},
{
"id": 24929009,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2,
"albedo": 0.14,
"spectralShift": 1
},
{
"id": 24929010,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2,
"albedo": 0.1387,
"spectralShift": 1
},
{
"id": 24929011,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2,
"albedo": 0.1353,
"spectralShift": 1
},
{
"id": 24929012,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2,
"albedo": 0.13,
"spectralShift": 1
},
{
"id": 24929013,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2,
"albedo": 0.204,
"spectralShift": 1
},
{
"id": 24929014,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2,
"albedo": 0.4829,
"spectralShift": 1
}
]"Project not found.""An error has occurred."