Modules
Process key IV points for module parameter derivation
Takes pre-extracted IV operating points across multiple irradiance/temperature conditions and computes derived parameters (temperature coefficients, fill factors, etc.) used as inputs to the single-diode solvers. Lighter-weight alternative to processIVCurves when you already have the key points.
POST
/
Module
/
Generator
/
ProcessKeyIVPoints
Process key IV points for module parameter derivation
curl --request POST \
--url https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"temperature": 25,
"irradiance": 1000,
"shortCircuitCurrent": 1.8075018622218608,
"mppCurrent": 1.631721,
"openCircuitVoltage": 90.82120931811704,
"mppVoltage": 71.22669,
"maxPower": 116.22208583349001,
"relativeEfficiency": 0
},
{
"temperature": 25,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 35,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 600,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
}
]
'import requests
url = "https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints"
payload = [
{
"temperature": 25,
"irradiance": 1000,
"shortCircuitCurrent": 1.8075018622218608,
"mppCurrent": 1.631721,
"openCircuitVoltage": 90.82120931811704,
"mppVoltage": 71.22669,
"maxPower": 116.22208583349001,
"relativeEfficiency": 0
},
{
"temperature": 25,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 35,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 600,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
temperature: 25,
irradiance: 1000,
shortCircuitCurrent: 1.8075018622218608,
mppCurrent: 1.631721,
openCircuitVoltage: 90.82120931811704,
mppVoltage: 71.22669,
maxPower: 116.22208583349001,
relativeEfficiency: 0
},
{
temperature: 25,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 35,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 45,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 45,
irradiance: 600,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
}
])
};
fetch('https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints', 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/Module/Generator/ProcessKeyIVPoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'temperature' => 25,
'irradiance' => 1000,
'shortCircuitCurrent' => 1.8075018622218608,
'mppCurrent' => 1.631721,
'openCircuitVoltage' => 90.82120931811704,
'mppVoltage' => 71.22669,
'maxPower' => 116.22208583349001,
'relativeEfficiency' => 0
],
[
'temperature' => 25,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 35,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 45,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 45,
'irradiance' => 600,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
]
]),
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/Module/Generator/ProcessKeyIVPoints"
payload := strings.NewReader("[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]"
response = http.request(request)
puts response.read_body{}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"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.
Body
application/json
Response
Processed key IV points result
The response is of type object.
⌘I
Process key IV points for module parameter derivation
curl --request POST \
--url https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"temperature": 25,
"irradiance": 1000,
"shortCircuitCurrent": 1.8075018622218608,
"mppCurrent": 1.631721,
"openCircuitVoltage": 90.82120931811704,
"mppVoltage": 71.22669,
"maxPower": 116.22208583349001,
"relativeEfficiency": 0
},
{
"temperature": 25,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 35,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 600,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
}
]
'import requests
url = "https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints"
payload = [
{
"temperature": 25,
"irradiance": 1000,
"shortCircuitCurrent": 1.8075018622218608,
"mppCurrent": 1.631721,
"openCircuitVoltage": 90.82120931811704,
"mppVoltage": 71.22669,
"maxPower": 116.22208583349001,
"relativeEfficiency": 0
},
{
"temperature": 25,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 35,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 800,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
},
{
"temperature": 45,
"irradiance": 600,
"shortCircuitCurrent": 1.7745452261679724,
"mppCurrent": 1.625599,
"openCircuitVoltage": 89.36778810038061,
"mppVoltage": 70.10053,
"maxPower": 113.95535146747001,
"relativeEfficiency": 0
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
temperature: 25,
irradiance: 1000,
shortCircuitCurrent: 1.8075018622218608,
mppCurrent: 1.631721,
openCircuitVoltage: 90.82120931811704,
mppVoltage: 71.22669,
maxPower: 116.22208583349001,
relativeEfficiency: 0
},
{
temperature: 25,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 35,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 45,
irradiance: 800,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
},
{
temperature: 45,
irradiance: 600,
shortCircuitCurrent: 1.7745452261679724,
mppCurrent: 1.625599,
openCircuitVoltage: 89.36778810038061,
mppVoltage: 70.10053,
maxPower: 113.95535146747001,
relativeEfficiency: 0
}
])
};
fetch('https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints', 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/Module/Generator/ProcessKeyIVPoints",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'temperature' => 25,
'irradiance' => 1000,
'shortCircuitCurrent' => 1.8075018622218608,
'mppCurrent' => 1.631721,
'openCircuitVoltage' => 90.82120931811704,
'mppVoltage' => 71.22669,
'maxPower' => 116.22208583349001,
'relativeEfficiency' => 0
],
[
'temperature' => 25,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 35,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 45,
'irradiance' => 800,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
],
[
'temperature' => 45,
'irradiance' => 600,
'shortCircuitCurrent' => 1.7745452261679724,
'mppCurrent' => 1.625599,
'openCircuitVoltage' => 89.36778810038061,
'mppVoltage' => 70.10053,
'maxPower' => 113.95535146747001,
'relativeEfficiency' => 0
]
]),
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/Module/Generator/ProcessKeyIVPoints"
payload := strings.NewReader("[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Module/Generator/ProcessKeyIVPoints")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"temperature\": 25,\n \"irradiance\": 1000,\n \"shortCircuitCurrent\": 1.8075018622218608,\n \"mppCurrent\": 1.631721,\n \"openCircuitVoltage\": 90.82120931811704,\n \"mppVoltage\": 71.22669,\n \"maxPower\": 116.22208583349001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 25,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 35,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 800,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n },\n {\n \"temperature\": 45,\n \"irradiance\": 600,\n \"shortCircuitCurrent\": 1.7745452261679724,\n \"mppCurrent\": 1.625599,\n \"openCircuitVoltage\": 89.36778810038061,\n \"mppVoltage\": 70.10053,\n \"maxPower\": 113.95535146747001,\n \"relativeEfficiency\": 0\n }\n]"
response = http.request(request)
puts response.read_body{}{
"message": "The request is invalid.",
"modelState": {
"latitude": [
"The field Latitude must be between -90 and 90."
]
}
}"An error has occurred."