Update a prediction
Updates an existing prediction. May attach an X-Message header with a non-blocking warning about the updated entity.
Parameters:
-
projectId(path, required): The project ID. -
prediction(body, required): The updated prediction entity.
curl --request PUT \
--url https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Postman Doc Sample - Name Update",
"description": "Sample Description PUT",
"status": 1,
"yearRepeater": 1,
"transpositionModel": 1,
"perezCoefficients": 0,
"diffuseDirectDecompModel": 3,
"circumsolarTreatment": 0,
"diffuseDirectDecompModelExecuted": false,
"useMeteoDni": false,
"useMeteoPOAI": false,
"useBacksidePOAI": false,
"useLeapYears": false,
"useWeatherFileAlbedoData": false,
"useMetastability": false,
"enableLeTID": false,
"airMassModel": 0,
"soilingModel": 0,
"modTempModel": 0,
"incAngleModel": 5,
"directBeamShadingModel": 5,
"degradationModel": 0,
"diffuseShadingModel": 1,
"linearDegradationRate": 0.5,
"firstYearDegradation": false,
"nonLinearDegradationRates": [],
"lightAndElevatedTemperatureDegradationRates": [],
"errorModelAcc": 2.9,
"errorSensAcc": 5,
"errorIntAnnVar": 3,
"errorMonAcc": 2,
"errorSpaVar": 2,
"siteResultList": null,
"spectralShiftModel": 2,
"spectralWeatherType": 0,
"powerPlantId": null,
"monthlyFactors": [
{
"id": 39132062,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132063,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132064,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132065,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132066,
"month": 5,
"monthName": "May",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132067,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132068,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132069,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132070,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132071,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132072,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132073,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
}
],
"horizonDetails": [],
"ashraeStation": "TOLEDO CGS, OH, USA",
"ashraeVersion": 2021,
"heat996": null,
"cool996": 32.5,
"max50Year": 39.4,
"min50Year": -30.3,
"minAnnualMeanDBTemp": -19.1,
"weather": null,
"weatherId": null,
"projectId": 133005,
"pValues": [],
"pValuesString": "",
"logicVersion": 11,
"setback": 0,
"targetDC": 0,
"weatherLocked": false,
"electricalShadingFractionalEffect": 100,
"useSpectral30": false,
"spectral30B0": -0.0967,
"spectral30B1": 0.0126,
"spectral30B2": 0.00223,
"spectral30B3": 1.086,
"id": 957033
}
'import requests
url = "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction"
payload = {
"name": "Postman Doc Sample - Name Update",
"description": "Sample Description PUT",
"status": 1,
"yearRepeater": 1,
"transpositionModel": 1,
"perezCoefficients": 0,
"diffuseDirectDecompModel": 3,
"circumsolarTreatment": 0,
"diffuseDirectDecompModelExecuted": False,
"useMeteoDni": False,
"useMeteoPOAI": False,
"useBacksidePOAI": False,
"useLeapYears": False,
"useWeatherFileAlbedoData": False,
"useMetastability": False,
"enableLeTID": False,
"airMassModel": 0,
"soilingModel": 0,
"modTempModel": 0,
"incAngleModel": 5,
"directBeamShadingModel": 5,
"degradationModel": 0,
"diffuseShadingModel": 1,
"linearDegradationRate": 0.5,
"firstYearDegradation": False,
"nonLinearDegradationRates": [],
"lightAndElevatedTemperatureDegradationRates": [],
"errorModelAcc": 2.9,
"errorSensAcc": 5,
"errorIntAnnVar": 3,
"errorMonAcc": 2,
"errorSpaVar": 2,
"siteResultList": None,
"spectralShiftModel": 2,
"spectralWeatherType": 0,
"powerPlantId": None,
"monthlyFactors": [
{
"id": 39132062,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132063,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132064,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132065,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132066,
"month": 5,
"monthName": "May",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132067,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132068,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132069,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132070,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132071,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132072,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132073,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
}
],
"horizonDetails": [],
"ashraeStation": "TOLEDO CGS, OH, USA",
"ashraeVersion": 2021,
"heat996": None,
"cool996": 32.5,
"max50Year": 39.4,
"min50Year": -30.3,
"minAnnualMeanDBTemp": -19.1,
"weather": None,
"weatherId": None,
"projectId": 133005,
"pValues": [],
"pValuesString": "",
"logicVersion": 11,
"setback": 0,
"targetDC": 0,
"weatherLocked": False,
"electricalShadingFractionalEffect": 100,
"useSpectral30": False,
"spectral30B0": -0.0967,
"spectral30B1": 0.0126,
"spectral30B2": 0.00223,
"spectral30B3": 1.086,
"id": 957033
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Postman Doc Sample - Name Update',
description: 'Sample Description PUT',
status: 1,
yearRepeater: 1,
transpositionModel: 1,
perezCoefficients: 0,
diffuseDirectDecompModel: 3,
circumsolarTreatment: 0,
diffuseDirectDecompModelExecuted: false,
useMeteoDni: false,
useMeteoPOAI: false,
useBacksidePOAI: false,
useLeapYears: false,
useWeatherFileAlbedoData: false,
useMetastability: false,
enableLeTID: false,
airMassModel: 0,
soilingModel: 0,
modTempModel: 0,
incAngleModel: 5,
directBeamShadingModel: 5,
degradationModel: 0,
diffuseShadingModel: 1,
linearDegradationRate: 0.5,
firstYearDegradation: false,
nonLinearDegradationRates: [],
lightAndElevatedTemperatureDegradationRates: [],
errorModelAcc: 2.9,
errorSensAcc: 5,
errorIntAnnVar: 3,
errorMonAcc: 2,
errorSpaVar: 2,
siteResultList: null,
spectralShiftModel: 2,
spectralWeatherType: 0,
powerPlantId: null,
monthlyFactors: [
{
id: 39132062,
month: 1,
monthName: 'Jan',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132063,
month: 2,
monthName: 'Feb',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132064,
month: 3,
monthName: 'Mar',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132065,
month: 4,
monthName: 'Apr',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132066,
month: 5,
monthName: 'May',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132067,
month: 6,
monthName: 'Jun',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132068,
month: 7,
monthName: 'Jul',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132069,
month: 8,
monthName: 'Aug',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132070,
month: 9,
monthName: 'Sep',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132071,
month: 10,
monthName: 'Oct',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132072,
month: 11,
monthName: 'Nov',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132073,
month: 12,
monthName: 'Dec',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
}
],
horizonDetails: [],
ashraeStation: 'TOLEDO CGS, OH, USA',
ashraeVersion: 2021,
heat996: null,
cool996: 32.5,
max50Year: 39.4,
min50Year: -30.3,
minAnnualMeanDBTemp: -19.1,
weather: null,
weatherId: null,
projectId: 133005,
pValues: [],
pValuesString: '',
logicVersion: 11,
setback: 0,
targetDC: 0,
weatherLocked: false,
electricalShadingFractionalEffect: 100,
useSpectral30: false,
spectral30B0: -0.0967,
spectral30B1: 0.0126,
spectral30B2: 0.00223,
spectral30B3: 1.086,
id: 957033
})
};
fetch('https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction', 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",
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' => 'Postman Doc Sample - Name Update',
'description' => 'Sample Description PUT',
'status' => 1,
'yearRepeater' => 1,
'transpositionModel' => 1,
'perezCoefficients' => 0,
'diffuseDirectDecompModel' => 3,
'circumsolarTreatment' => 0,
'diffuseDirectDecompModelExecuted' => false,
'useMeteoDni' => false,
'useMeteoPOAI' => false,
'useBacksidePOAI' => false,
'useLeapYears' => false,
'useWeatherFileAlbedoData' => false,
'useMetastability' => false,
'enableLeTID' => false,
'airMassModel' => 0,
'soilingModel' => 0,
'modTempModel' => 0,
'incAngleModel' => 5,
'directBeamShadingModel' => 5,
'degradationModel' => 0,
'diffuseShadingModel' => 1,
'linearDegradationRate' => 0.5,
'firstYearDegradation' => false,
'nonLinearDegradationRates' => [
],
'lightAndElevatedTemperatureDegradationRates' => [
],
'errorModelAcc' => 2.9,
'errorSensAcc' => 5,
'errorIntAnnVar' => 3,
'errorMonAcc' => 2,
'errorSpaVar' => 2,
'siteResultList' => null,
'spectralShiftModel' => 2,
'spectralWeatherType' => 0,
'powerPlantId' => null,
'monthlyFactors' => [
[
'id' => 39132062,
'month' => 1,
'monthName' => 'Jan',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132063,
'month' => 2,
'monthName' => 'Feb',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132064,
'month' => 3,
'monthName' => 'Mar',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132065,
'month' => 4,
'monthName' => 'Apr',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132066,
'month' => 5,
'monthName' => 'May',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132067,
'month' => 6,
'monthName' => 'Jun',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132068,
'month' => 7,
'monthName' => 'Jul',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132069,
'month' => 8,
'monthName' => 'Aug',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132070,
'month' => 9,
'monthName' => 'Sep',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132071,
'month' => 10,
'monthName' => 'Oct',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132072,
'month' => 11,
'monthName' => 'Nov',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132073,
'month' => 12,
'monthName' => 'Dec',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
]
],
'horizonDetails' => [
],
'ashraeStation' => 'TOLEDO CGS, OH, USA',
'ashraeVersion' => 2021,
'heat996' => null,
'cool996' => 32.5,
'max50Year' => 39.4,
'min50Year' => -30.3,
'minAnnualMeanDBTemp' => -19.1,
'weather' => null,
'weatherId' => null,
'projectId' => 133005,
'pValues' => [
],
'pValuesString' => '',
'logicVersion' => 11,
'setback' => 0,
'targetDC' => 0,
'weatherLocked' => false,
'electricalShadingFractionalEffect' => 100,
'useSpectral30' => false,
'spectral30B0' => -0.0967,
'spectral30B1' => 0.0126,
'spectral30B2' => 0.00223,
'spectral30B3' => 1.086,
'id' => 957033
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.plantpredict.terabase.energy/Project/{projectId}/Prediction"
payload := strings.NewReader("{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.plantpredict.terabase.energy/Project/{projectId}/Prediction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}"
response = http.request(request)
puts response.read_body{
"changesMade": true
}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"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.
Path Parameters
Body
PredictionStatusEnum
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ISO-8601 datetime as returned by the PlantPredict API. May or may not include a timezone offset; treat as server-local when no offset is present.
ISO-8601 datetime as returned by the PlantPredict API. May or may not include a timezone offset; treat as server-local when no offset is present.
TranspositionModelType
0, 1 PerezCoefficientsEnum
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 DiffuseDirectDecompModelType
0, 1, 2, 3 CircumsolarTreatmentType
0, 1 AirMassModelType
0, 1 SoilingModelType
0, 1, 2 ModuleTemperatureModelType
0, 1, 2, 3 IncidenceAngleModelType
2, 3, 4, 5, 6 DirectBeamShadingModel
0, 1, 2, 3, 5, 6 DegradationModel
0, 1, 2, 3, 4 DiffuseShadingModel
0, 1 SpectralShiftModel
0, 1, 2, 3 AshraeVersionEnum
0, 1 PredictionVersionEnum
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 Show child attributes
Show child attributes
Response
Update result
curl --request PUT \
--url https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Postman Doc Sample - Name Update",
"description": "Sample Description PUT",
"status": 1,
"yearRepeater": 1,
"transpositionModel": 1,
"perezCoefficients": 0,
"diffuseDirectDecompModel": 3,
"circumsolarTreatment": 0,
"diffuseDirectDecompModelExecuted": false,
"useMeteoDni": false,
"useMeteoPOAI": false,
"useBacksidePOAI": false,
"useLeapYears": false,
"useWeatherFileAlbedoData": false,
"useMetastability": false,
"enableLeTID": false,
"airMassModel": 0,
"soilingModel": 0,
"modTempModel": 0,
"incAngleModel": 5,
"directBeamShadingModel": 5,
"degradationModel": 0,
"diffuseShadingModel": 1,
"linearDegradationRate": 0.5,
"firstYearDegradation": false,
"nonLinearDegradationRates": [],
"lightAndElevatedTemperatureDegradationRates": [],
"errorModelAcc": 2.9,
"errorSensAcc": 5,
"errorIntAnnVar": 3,
"errorMonAcc": 2,
"errorSpaVar": 2,
"siteResultList": null,
"spectralShiftModel": 2,
"spectralWeatherType": 0,
"powerPlantId": null,
"monthlyFactors": [
{
"id": 39132062,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132063,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132064,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132065,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132066,
"month": 5,
"monthName": "May",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132067,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132068,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132069,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132070,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132071,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132072,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
},
{
"id": 39132073,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": null
}
],
"horizonDetails": [],
"ashraeStation": "TOLEDO CGS, OH, USA",
"ashraeVersion": 2021,
"heat996": null,
"cool996": 32.5,
"max50Year": 39.4,
"min50Year": -30.3,
"minAnnualMeanDBTemp": -19.1,
"weather": null,
"weatherId": null,
"projectId": 133005,
"pValues": [],
"pValuesString": "",
"logicVersion": 11,
"setback": 0,
"targetDC": 0,
"weatherLocked": false,
"electricalShadingFractionalEffect": 100,
"useSpectral30": false,
"spectral30B0": -0.0967,
"spectral30B1": 0.0126,
"spectral30B2": 0.00223,
"spectral30B3": 1.086,
"id": 957033
}
'import requests
url = "https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction"
payload = {
"name": "Postman Doc Sample - Name Update",
"description": "Sample Description PUT",
"status": 1,
"yearRepeater": 1,
"transpositionModel": 1,
"perezCoefficients": 0,
"diffuseDirectDecompModel": 3,
"circumsolarTreatment": 0,
"diffuseDirectDecompModelExecuted": False,
"useMeteoDni": False,
"useMeteoPOAI": False,
"useBacksidePOAI": False,
"useLeapYears": False,
"useWeatherFileAlbedoData": False,
"useMetastability": False,
"enableLeTID": False,
"airMassModel": 0,
"soilingModel": 0,
"modTempModel": 0,
"incAngleModel": 5,
"directBeamShadingModel": 5,
"degradationModel": 0,
"diffuseShadingModel": 1,
"linearDegradationRate": 0.5,
"firstYearDegradation": False,
"nonLinearDegradationRates": [],
"lightAndElevatedTemperatureDegradationRates": [],
"errorModelAcc": 2.9,
"errorSensAcc": 5,
"errorIntAnnVar": 3,
"errorMonAcc": 2,
"errorSpaVar": 2,
"siteResultList": None,
"spectralShiftModel": 2,
"spectralWeatherType": 0,
"powerPlantId": None,
"monthlyFactors": [
{
"id": 39132062,
"month": 1,
"monthName": "Jan",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132063,
"month": 2,
"monthName": "Feb",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132064,
"month": 3,
"monthName": "Mar",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132065,
"month": 4,
"monthName": "Apr",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132066,
"month": 5,
"monthName": "May",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132067,
"month": 6,
"monthName": "Jun",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132068,
"month": 7,
"monthName": "Jul",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132069,
"month": 8,
"monthName": "Aug",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132070,
"month": 9,
"monthName": "Sep",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132071,
"month": 10,
"monthName": "Oct",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132072,
"month": 11,
"monthName": "Nov",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
},
{
"id": 39132073,
"month": 12,
"monthName": "Dec",
"soilingLoss": 2.2,
"albedo": 0.3,
"spectralShift": None
}
],
"horizonDetails": [],
"ashraeStation": "TOLEDO CGS, OH, USA",
"ashraeVersion": 2021,
"heat996": None,
"cool996": 32.5,
"max50Year": 39.4,
"min50Year": -30.3,
"minAnnualMeanDBTemp": -19.1,
"weather": None,
"weatherId": None,
"projectId": 133005,
"pValues": [],
"pValuesString": "",
"logicVersion": 11,
"setback": 0,
"targetDC": 0,
"weatherLocked": False,
"electricalShadingFractionalEffect": 100,
"useSpectral30": False,
"spectral30B0": -0.0967,
"spectral30B1": 0.0126,
"spectral30B2": 0.00223,
"spectral30B3": 1.086,
"id": 957033
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Postman Doc Sample - Name Update',
description: 'Sample Description PUT',
status: 1,
yearRepeater: 1,
transpositionModel: 1,
perezCoefficients: 0,
diffuseDirectDecompModel: 3,
circumsolarTreatment: 0,
diffuseDirectDecompModelExecuted: false,
useMeteoDni: false,
useMeteoPOAI: false,
useBacksidePOAI: false,
useLeapYears: false,
useWeatherFileAlbedoData: false,
useMetastability: false,
enableLeTID: false,
airMassModel: 0,
soilingModel: 0,
modTempModel: 0,
incAngleModel: 5,
directBeamShadingModel: 5,
degradationModel: 0,
diffuseShadingModel: 1,
linearDegradationRate: 0.5,
firstYearDegradation: false,
nonLinearDegradationRates: [],
lightAndElevatedTemperatureDegradationRates: [],
errorModelAcc: 2.9,
errorSensAcc: 5,
errorIntAnnVar: 3,
errorMonAcc: 2,
errorSpaVar: 2,
siteResultList: null,
spectralShiftModel: 2,
spectralWeatherType: 0,
powerPlantId: null,
monthlyFactors: [
{
id: 39132062,
month: 1,
monthName: 'Jan',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132063,
month: 2,
monthName: 'Feb',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132064,
month: 3,
monthName: 'Mar',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132065,
month: 4,
monthName: 'Apr',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132066,
month: 5,
monthName: 'May',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132067,
month: 6,
monthName: 'Jun',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132068,
month: 7,
monthName: 'Jul',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132069,
month: 8,
monthName: 'Aug',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132070,
month: 9,
monthName: 'Sep',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132071,
month: 10,
monthName: 'Oct',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132072,
month: 11,
monthName: 'Nov',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
},
{
id: 39132073,
month: 12,
monthName: 'Dec',
soilingLoss: 2.2,
albedo: 0.3,
spectralShift: null
}
],
horizonDetails: [],
ashraeStation: 'TOLEDO CGS, OH, USA',
ashraeVersion: 2021,
heat996: null,
cool996: 32.5,
max50Year: 39.4,
min50Year: -30.3,
minAnnualMeanDBTemp: -19.1,
weather: null,
weatherId: null,
projectId: 133005,
pValues: [],
pValuesString: '',
logicVersion: 11,
setback: 0,
targetDC: 0,
weatherLocked: false,
electricalShadingFractionalEffect: 100,
useSpectral30: false,
spectral30B0: -0.0967,
spectral30B1: 0.0126,
spectral30B2: 0.00223,
spectral30B3: 1.086,
id: 957033
})
};
fetch('https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction', 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",
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' => 'Postman Doc Sample - Name Update',
'description' => 'Sample Description PUT',
'status' => 1,
'yearRepeater' => 1,
'transpositionModel' => 1,
'perezCoefficients' => 0,
'diffuseDirectDecompModel' => 3,
'circumsolarTreatment' => 0,
'diffuseDirectDecompModelExecuted' => false,
'useMeteoDni' => false,
'useMeteoPOAI' => false,
'useBacksidePOAI' => false,
'useLeapYears' => false,
'useWeatherFileAlbedoData' => false,
'useMetastability' => false,
'enableLeTID' => false,
'airMassModel' => 0,
'soilingModel' => 0,
'modTempModel' => 0,
'incAngleModel' => 5,
'directBeamShadingModel' => 5,
'degradationModel' => 0,
'diffuseShadingModel' => 1,
'linearDegradationRate' => 0.5,
'firstYearDegradation' => false,
'nonLinearDegradationRates' => [
],
'lightAndElevatedTemperatureDegradationRates' => [
],
'errorModelAcc' => 2.9,
'errorSensAcc' => 5,
'errorIntAnnVar' => 3,
'errorMonAcc' => 2,
'errorSpaVar' => 2,
'siteResultList' => null,
'spectralShiftModel' => 2,
'spectralWeatherType' => 0,
'powerPlantId' => null,
'monthlyFactors' => [
[
'id' => 39132062,
'month' => 1,
'monthName' => 'Jan',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132063,
'month' => 2,
'monthName' => 'Feb',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132064,
'month' => 3,
'monthName' => 'Mar',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132065,
'month' => 4,
'monthName' => 'Apr',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132066,
'month' => 5,
'monthName' => 'May',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132067,
'month' => 6,
'monthName' => 'Jun',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132068,
'month' => 7,
'monthName' => 'Jul',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132069,
'month' => 8,
'monthName' => 'Aug',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132070,
'month' => 9,
'monthName' => 'Sep',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132071,
'month' => 10,
'monthName' => 'Oct',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132072,
'month' => 11,
'monthName' => 'Nov',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
],
[
'id' => 39132073,
'month' => 12,
'monthName' => 'Dec',
'soilingLoss' => 2.2,
'albedo' => 0.3,
'spectralShift' => null
]
],
'horizonDetails' => [
],
'ashraeStation' => 'TOLEDO CGS, OH, USA',
'ashraeVersion' => 2021,
'heat996' => null,
'cool996' => 32.5,
'max50Year' => 39.4,
'min50Year' => -30.3,
'minAnnualMeanDBTemp' => -19.1,
'weather' => null,
'weatherId' => null,
'projectId' => 133005,
'pValues' => [
],
'pValuesString' => '',
'logicVersion' => 11,
'setback' => 0,
'targetDC' => 0,
'weatherLocked' => false,
'electricalShadingFractionalEffect' => 100,
'useSpectral30' => false,
'spectral30B0' => -0.0967,
'spectral30B1' => 0.0126,
'spectral30B2' => 0.00223,
'spectral30B3' => 1.086,
'id' => 957033
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.plantpredict.terabase.energy/Project/{projectId}/Prediction"
payload := strings.NewReader("{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.plantpredict.terabase.energy/Project/{projectId}/Prediction")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Project/{projectId}/Prediction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Postman Doc Sample - Name Update\",\n \"description\": \"Sample Description PUT\",\n \"status\": 1,\n \"yearRepeater\": 1,\n \"transpositionModel\": 1,\n \"perezCoefficients\": 0,\n \"diffuseDirectDecompModel\": 3,\n \"circumsolarTreatment\": 0,\n \"diffuseDirectDecompModelExecuted\": false,\n \"useMeteoDni\": false,\n \"useMeteoPOAI\": false,\n \"useBacksidePOAI\": false,\n \"useLeapYears\": false,\n \"useWeatherFileAlbedoData\": false,\n \"useMetastability\": false,\n \"enableLeTID\": false,\n \"airMassModel\": 0,\n \"soilingModel\": 0,\n \"modTempModel\": 0,\n \"incAngleModel\": 5,\n \"directBeamShadingModel\": 5,\n \"degradationModel\": 0,\n \"diffuseShadingModel\": 1,\n \"linearDegradationRate\": 0.5,\n \"firstYearDegradation\": false,\n \"nonLinearDegradationRates\": [],\n \"lightAndElevatedTemperatureDegradationRates\": [],\n \"errorModelAcc\": 2.9,\n \"errorSensAcc\": 5,\n \"errorIntAnnVar\": 3,\n \"errorMonAcc\": 2,\n \"errorSpaVar\": 2,\n \"siteResultList\": null,\n \"spectralShiftModel\": 2,\n \"spectralWeatherType\": 0,\n \"powerPlantId\": null,\n \"monthlyFactors\": [\n {\n \"id\": 39132062,\n \"month\": 1,\n \"monthName\": \"Jan\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132063,\n \"month\": 2,\n \"monthName\": \"Feb\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132064,\n \"month\": 3,\n \"monthName\": \"Mar\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132065,\n \"month\": 4,\n \"monthName\": \"Apr\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132066,\n \"month\": 5,\n \"monthName\": \"May\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132067,\n \"month\": 6,\n \"monthName\": \"Jun\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132068,\n \"month\": 7,\n \"monthName\": \"Jul\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132069,\n \"month\": 8,\n \"monthName\": \"Aug\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132070,\n \"month\": 9,\n \"monthName\": \"Sep\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132071,\n \"month\": 10,\n \"monthName\": \"Oct\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132072,\n \"month\": 11,\n \"monthName\": \"Nov\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n },\n {\n \"id\": 39132073,\n \"month\": 12,\n \"monthName\": \"Dec\",\n \"soilingLoss\": 2.2,\n \"albedo\": 0.3,\n \"spectralShift\": null\n }\n ],\n \"horizonDetails\": [],\n \"ashraeStation\": \"TOLEDO CGS, OH, USA\",\n \"ashraeVersion\": 2021,\n \"heat996\": null,\n \"cool996\": 32.5,\n \"max50Year\": 39.4,\n \"min50Year\": -30.3,\n \"minAnnualMeanDBTemp\": -19.1,\n \"weather\": null,\n \"weatherId\": null,\n \"projectId\": 133005,\n \"pValues\": [],\n \"pValuesString\": \"\",\n \"logicVersion\": 11,\n \"setback\": 0,\n \"targetDC\": 0,\n \"weatherLocked\": false,\n \"electricalShadingFractionalEffect\": 100,\n \"useSpectral30\": false,\n \"spectral30B0\": -0.0967,\n \"spectral30B1\": 0.0126,\n \"spectral30B2\": 0.00223,\n \"spectral30B3\": 1.086,\n \"id\": 957033\n}"
response = http.request(request)
puts response.read_body{
"changesMade": true
}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"Project not found.""An error has occurred."