Weather
Update weather file metadata
Renames a weather file and/or updates lightweight metadata fields without touching the underlying hourly data.
PUT
/
Weather
/
{weatherId}
/
TitleUpdate
Update weather file metadata
curl --request PUT \
--url https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": 1,
"distance": 0,
"locality": "Hurghada 2",
"stateProvince": "Red Sea Governorate",
"stateProvinceCode": "Red Sea Governorate",
"country": "Egypt",
"countryCode": "EG",
"region": "Africa",
"source": "Meteonorm - 27.323N - 33.607E.xlsx",
"stationName": "",
"format": 3,
"stationCode": null,
"latitude": 27.3230667,
"longitude": 33.6068764,
"elevation": 127,
"timeZone": 2,
"timestampDefinition": 0,
"timestampDefinitionOriginal": 0,
"timeInterval": 60,
"startDate": "2005-01-01T00:00:00",
"endDate": "2005-12-31T23:00:00",
"globalHorizontalIrradianceSum": 2081.92,
"diffuseHorizontalIrradianceSum": 757.37,
"directNormalIrradianceSum": 2054.86,
"planeOfArrayIrradianceSum": null,
"averageAirTemperature": 25.44,
"maxAirTemperature": 41.52,
"averageRelativeHumidity": 41.54,
"averageWindSpeed": 5.92,
"averagePrecipitableWater": null,
"averageDewpoint": null,
"averageSoilingLoss": null,
"rainfallSum": null,
"weatherDataModelVersion": "8.0.4.19761",
"dataProvider": 4,
"pLevel": 0,
"windSensorHeight": 10,
"weatherDetails": null,
"dataType": 1,
"customerName": "",
"apiLocked": false,
"apiDownloaded": false,
"weatherFileKey": "00000000-0000-0000-0000-000000000000",
"offsetMinutes": 0,
"usingFirstSolarKey": false,
"moduleTilt": null,
"moduleAzimuth": null,
"trackingType": null,
"trackingBacktrackingType": 0,
"minimumTrackingLimitAngleD": 0,
"maximumTrackingLimitAngleD": null,
"trackerPitchAngleD": 0,
"trackerStowAngle": 0,
"groundCoverageRatio": null,
"id": 65731,
"name": "Meteonorm - 27.323N - 33.607E",
"description": null,
"companyId": 1042,
"company": null,
"ownerId": 5093,
"owner": {
"claims": [],
"logins": [],
"roles": [],
"company": null,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": null,
"status": 1,
"settings": null,
"costCenter": null,
"migrationAgreementAcceptance": true,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
},
"createdDate": "2021-12-02T18:12:46.897",
"lastModified": "2021-12-02T18:12:46.897",
"lastModifiedById": 5093,
"lastModifiedBy": {
"claims": [],
"logins": [],
"roles": [],
"company": null,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": null,
"status": 1,
"settings": null,
"costCenter": null,
"migrationAgreementAcceptance": true,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
}
}
'import requests
url = "https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate"
payload = {
"status": 1,
"distance": 0,
"locality": "Hurghada 2",
"stateProvince": "Red Sea Governorate",
"stateProvinceCode": "Red Sea Governorate",
"country": "Egypt",
"countryCode": "EG",
"region": "Africa",
"source": "Meteonorm - 27.323N - 33.607E.xlsx",
"stationName": "",
"format": 3,
"stationCode": None,
"latitude": 27.3230667,
"longitude": 33.6068764,
"elevation": 127,
"timeZone": 2,
"timestampDefinition": 0,
"timestampDefinitionOriginal": 0,
"timeInterval": 60,
"startDate": "2005-01-01T00:00:00",
"endDate": "2005-12-31T23:00:00",
"globalHorizontalIrradianceSum": 2081.92,
"diffuseHorizontalIrradianceSum": 757.37,
"directNormalIrradianceSum": 2054.86,
"planeOfArrayIrradianceSum": None,
"averageAirTemperature": 25.44,
"maxAirTemperature": 41.52,
"averageRelativeHumidity": 41.54,
"averageWindSpeed": 5.92,
"averagePrecipitableWater": None,
"averageDewpoint": None,
"averageSoilingLoss": None,
"rainfallSum": None,
"weatherDataModelVersion": "8.0.4.19761",
"dataProvider": 4,
"pLevel": 0,
"windSensorHeight": 10,
"weatherDetails": None,
"dataType": 1,
"customerName": "",
"apiLocked": False,
"apiDownloaded": False,
"weatherFileKey": "00000000-0000-0000-0000-000000000000",
"offsetMinutes": 0,
"usingFirstSolarKey": False,
"moduleTilt": None,
"moduleAzimuth": None,
"trackingType": None,
"trackingBacktrackingType": 0,
"minimumTrackingLimitAngleD": 0,
"maximumTrackingLimitAngleD": None,
"trackerPitchAngleD": 0,
"trackerStowAngle": 0,
"groundCoverageRatio": None,
"id": 65731,
"name": "Meteonorm - 27.323N - 33.607E",
"description": None,
"companyId": 1042,
"company": None,
"ownerId": 5093,
"owner": {
"claims": [],
"logins": [],
"roles": [],
"company": None,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": None,
"status": 1,
"settings": None,
"costCenter": None,
"migrationAgreementAcceptance": True,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
},
"createdDate": "2021-12-02T18:12:46.897",
"lastModified": "2021-12-02T18:12:46.897",
"lastModifiedById": 5093,
"lastModifiedBy": {
"claims": [],
"logins": [],
"roles": [],
"company": None,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": None,
"status": 1,
"settings": None,
"costCenter": None,
"migrationAgreementAcceptance": True,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
}
}
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({
status: 1,
distance: 0,
locality: 'Hurghada 2',
stateProvince: 'Red Sea Governorate',
stateProvinceCode: 'Red Sea Governorate',
country: 'Egypt',
countryCode: 'EG',
region: 'Africa',
source: 'Meteonorm - 27.323N - 33.607E.xlsx',
stationName: '',
format: 3,
stationCode: null,
latitude: 27.3230667,
longitude: 33.6068764,
elevation: 127,
timeZone: 2,
timestampDefinition: 0,
timestampDefinitionOriginal: 0,
timeInterval: 60,
startDate: '2005-01-01T00:00:00',
endDate: '2005-12-31T23:00:00',
globalHorizontalIrradianceSum: 2081.92,
diffuseHorizontalIrradianceSum: 757.37,
directNormalIrradianceSum: 2054.86,
planeOfArrayIrradianceSum: null,
averageAirTemperature: 25.44,
maxAirTemperature: 41.52,
averageRelativeHumidity: 41.54,
averageWindSpeed: 5.92,
averagePrecipitableWater: null,
averageDewpoint: null,
averageSoilingLoss: null,
rainfallSum: null,
weatherDataModelVersion: '8.0.4.19761',
dataProvider: 4,
pLevel: 0,
windSensorHeight: 10,
weatherDetails: null,
dataType: 1,
customerName: '',
apiLocked: false,
apiDownloaded: false,
weatherFileKey: '00000000-0000-0000-0000-000000000000',
offsetMinutes: 0,
usingFirstSolarKey: false,
moduleTilt: null,
moduleAzimuth: null,
trackingType: null,
trackingBacktrackingType: 0,
minimumTrackingLimitAngleD: 0,
maximumTrackingLimitAngleD: null,
trackerPitchAngleD: 0,
trackerStowAngle: 0,
groundCoverageRatio: null,
id: 65731,
name: 'Meteonorm - 27.323N - 33.607E',
description: null,
companyId: 1042,
company: null,
ownerId: 5093,
owner: {
claims: [],
logins: [],
roles: [],
company: null,
companyId: 1042,
firstName: 'Jesse',
lastName: 'Milam',
jobTitle: 'Software Developer',
createdByUserId: 5091,
createdByUser: null,
status: 1,
settings: null,
costCenter: null,
migrationAgreementAcceptance: true,
clientCredentialsCreatedOnUTC: '2021-11-30T14:16:05.783',
email: 'jmilam@terabase.energy',
id: 5093
},
createdDate: '2021-12-02T18:12:46.897',
lastModified: '2021-12-02T18:12:46.897',
lastModifiedById: 5093,
lastModifiedBy: {
claims: [],
logins: [],
roles: [],
company: null,
companyId: 1042,
firstName: 'Jesse',
lastName: 'Milam',
jobTitle: 'Software Developer',
createdByUserId: 5091,
createdByUser: null,
status: 1,
settings: null,
costCenter: null,
migrationAgreementAcceptance: true,
clientCredentialsCreatedOnUTC: '2021-11-30T14:16:05.783',
email: 'jmilam@terabase.energy',
id: 5093
}
})
};
fetch('https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate', 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/Weather/{weatherId}/TitleUpdate",
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([
'status' => 1,
'distance' => 0,
'locality' => 'Hurghada 2',
'stateProvince' => 'Red Sea Governorate',
'stateProvinceCode' => 'Red Sea Governorate',
'country' => 'Egypt',
'countryCode' => 'EG',
'region' => 'Africa',
'source' => 'Meteonorm - 27.323N - 33.607E.xlsx',
'stationName' => '',
'format' => 3,
'stationCode' => null,
'latitude' => 27.3230667,
'longitude' => 33.6068764,
'elevation' => 127,
'timeZone' => 2,
'timestampDefinition' => 0,
'timestampDefinitionOriginal' => 0,
'timeInterval' => 60,
'startDate' => '2005-01-01T00:00:00',
'endDate' => '2005-12-31T23:00:00',
'globalHorizontalIrradianceSum' => 2081.92,
'diffuseHorizontalIrradianceSum' => 757.37,
'directNormalIrradianceSum' => 2054.86,
'planeOfArrayIrradianceSum' => null,
'averageAirTemperature' => 25.44,
'maxAirTemperature' => 41.52,
'averageRelativeHumidity' => 41.54,
'averageWindSpeed' => 5.92,
'averagePrecipitableWater' => null,
'averageDewpoint' => null,
'averageSoilingLoss' => null,
'rainfallSum' => null,
'weatherDataModelVersion' => '8.0.4.19761',
'dataProvider' => 4,
'pLevel' => 0,
'windSensorHeight' => 10,
'weatherDetails' => null,
'dataType' => 1,
'customerName' => '',
'apiLocked' => false,
'apiDownloaded' => false,
'weatherFileKey' => '00000000-0000-0000-0000-000000000000',
'offsetMinutes' => 0,
'usingFirstSolarKey' => false,
'moduleTilt' => null,
'moduleAzimuth' => null,
'trackingType' => null,
'trackingBacktrackingType' => 0,
'minimumTrackingLimitAngleD' => 0,
'maximumTrackingLimitAngleD' => null,
'trackerPitchAngleD' => 0,
'trackerStowAngle' => 0,
'groundCoverageRatio' => null,
'id' => 65731,
'name' => 'Meteonorm - 27.323N - 33.607E',
'description' => null,
'companyId' => 1042,
'company' => null,
'ownerId' => 5093,
'owner' => [
'claims' => [
],
'logins' => [
],
'roles' => [
],
'company' => null,
'companyId' => 1042,
'firstName' => 'Jesse',
'lastName' => 'Milam',
'jobTitle' => 'Software Developer',
'createdByUserId' => 5091,
'createdByUser' => null,
'status' => 1,
'settings' => null,
'costCenter' => null,
'migrationAgreementAcceptance' => true,
'clientCredentialsCreatedOnUTC' => '2021-11-30T14:16:05.783',
'email' => 'jmilam@terabase.energy',
'id' => 5093
],
'createdDate' => '2021-12-02T18:12:46.897',
'lastModified' => '2021-12-02T18:12:46.897',
'lastModifiedById' => 5093,
'lastModifiedBy' => [
'claims' => [
],
'logins' => [
],
'roles' => [
],
'company' => null,
'companyId' => 1042,
'firstName' => 'Jesse',
'lastName' => 'Milam',
'jobTitle' => 'Software Developer',
'createdByUserId' => 5091,
'createdByUser' => null,
'status' => 1,
'settings' => null,
'costCenter' => null,
'migrationAgreementAcceptance' => true,
'clientCredentialsCreatedOnUTC' => '2021-11-30T14:16:05.783',
'email' => 'jmilam@terabase.energy',
'id' => 5093
]
]),
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/Weather/{weatherId}/TitleUpdate"
payload := strings.NewReader("{\n \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n }\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/Weather/{weatherId}/TitleUpdate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate")
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 \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\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."
]
}
}"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
application/json
LibraryStatusEnum
Available options:
0, 1, 2, 3, 4, 5, 6 WeatherSourceTypeAPIEnum
Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 WeatherFormat
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 WeatherTimestampDefinitionEnum
Available options:
0, 1, 2, 3 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.
WeatherDataProvider
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 WeatherDataType
Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 DCFieldTrackingTypeEnum
Available options:
0, 1, 2 Response
Updated
⌘I
Update weather file metadata
curl --request PUT \
--url https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": 1,
"distance": 0,
"locality": "Hurghada 2",
"stateProvince": "Red Sea Governorate",
"stateProvinceCode": "Red Sea Governorate",
"country": "Egypt",
"countryCode": "EG",
"region": "Africa",
"source": "Meteonorm - 27.323N - 33.607E.xlsx",
"stationName": "",
"format": 3,
"stationCode": null,
"latitude": 27.3230667,
"longitude": 33.6068764,
"elevation": 127,
"timeZone": 2,
"timestampDefinition": 0,
"timestampDefinitionOriginal": 0,
"timeInterval": 60,
"startDate": "2005-01-01T00:00:00",
"endDate": "2005-12-31T23:00:00",
"globalHorizontalIrradianceSum": 2081.92,
"diffuseHorizontalIrradianceSum": 757.37,
"directNormalIrradianceSum": 2054.86,
"planeOfArrayIrradianceSum": null,
"averageAirTemperature": 25.44,
"maxAirTemperature": 41.52,
"averageRelativeHumidity": 41.54,
"averageWindSpeed": 5.92,
"averagePrecipitableWater": null,
"averageDewpoint": null,
"averageSoilingLoss": null,
"rainfallSum": null,
"weatherDataModelVersion": "8.0.4.19761",
"dataProvider": 4,
"pLevel": 0,
"windSensorHeight": 10,
"weatherDetails": null,
"dataType": 1,
"customerName": "",
"apiLocked": false,
"apiDownloaded": false,
"weatherFileKey": "00000000-0000-0000-0000-000000000000",
"offsetMinutes": 0,
"usingFirstSolarKey": false,
"moduleTilt": null,
"moduleAzimuth": null,
"trackingType": null,
"trackingBacktrackingType": 0,
"minimumTrackingLimitAngleD": 0,
"maximumTrackingLimitAngleD": null,
"trackerPitchAngleD": 0,
"trackerStowAngle": 0,
"groundCoverageRatio": null,
"id": 65731,
"name": "Meteonorm - 27.323N - 33.607E",
"description": null,
"companyId": 1042,
"company": null,
"ownerId": 5093,
"owner": {
"claims": [],
"logins": [],
"roles": [],
"company": null,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": null,
"status": 1,
"settings": null,
"costCenter": null,
"migrationAgreementAcceptance": true,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
},
"createdDate": "2021-12-02T18:12:46.897",
"lastModified": "2021-12-02T18:12:46.897",
"lastModifiedById": 5093,
"lastModifiedBy": {
"claims": [],
"logins": [],
"roles": [],
"company": null,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": null,
"status": 1,
"settings": null,
"costCenter": null,
"migrationAgreementAcceptance": true,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
}
}
'import requests
url = "https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate"
payload = {
"status": 1,
"distance": 0,
"locality": "Hurghada 2",
"stateProvince": "Red Sea Governorate",
"stateProvinceCode": "Red Sea Governorate",
"country": "Egypt",
"countryCode": "EG",
"region": "Africa",
"source": "Meteonorm - 27.323N - 33.607E.xlsx",
"stationName": "",
"format": 3,
"stationCode": None,
"latitude": 27.3230667,
"longitude": 33.6068764,
"elevation": 127,
"timeZone": 2,
"timestampDefinition": 0,
"timestampDefinitionOriginal": 0,
"timeInterval": 60,
"startDate": "2005-01-01T00:00:00",
"endDate": "2005-12-31T23:00:00",
"globalHorizontalIrradianceSum": 2081.92,
"diffuseHorizontalIrradianceSum": 757.37,
"directNormalIrradianceSum": 2054.86,
"planeOfArrayIrradianceSum": None,
"averageAirTemperature": 25.44,
"maxAirTemperature": 41.52,
"averageRelativeHumidity": 41.54,
"averageWindSpeed": 5.92,
"averagePrecipitableWater": None,
"averageDewpoint": None,
"averageSoilingLoss": None,
"rainfallSum": None,
"weatherDataModelVersion": "8.0.4.19761",
"dataProvider": 4,
"pLevel": 0,
"windSensorHeight": 10,
"weatherDetails": None,
"dataType": 1,
"customerName": "",
"apiLocked": False,
"apiDownloaded": False,
"weatherFileKey": "00000000-0000-0000-0000-000000000000",
"offsetMinutes": 0,
"usingFirstSolarKey": False,
"moduleTilt": None,
"moduleAzimuth": None,
"trackingType": None,
"trackingBacktrackingType": 0,
"minimumTrackingLimitAngleD": 0,
"maximumTrackingLimitAngleD": None,
"trackerPitchAngleD": 0,
"trackerStowAngle": 0,
"groundCoverageRatio": None,
"id": 65731,
"name": "Meteonorm - 27.323N - 33.607E",
"description": None,
"companyId": 1042,
"company": None,
"ownerId": 5093,
"owner": {
"claims": [],
"logins": [],
"roles": [],
"company": None,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": None,
"status": 1,
"settings": None,
"costCenter": None,
"migrationAgreementAcceptance": True,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
},
"createdDate": "2021-12-02T18:12:46.897",
"lastModified": "2021-12-02T18:12:46.897",
"lastModifiedById": 5093,
"lastModifiedBy": {
"claims": [],
"logins": [],
"roles": [],
"company": None,
"companyId": 1042,
"firstName": "Jesse",
"lastName": "Milam",
"jobTitle": "Software Developer",
"createdByUserId": 5091,
"createdByUser": None,
"status": 1,
"settings": None,
"costCenter": None,
"migrationAgreementAcceptance": True,
"clientCredentialsCreatedOnUTC": "2021-11-30T14:16:05.783",
"email": "jmilam@terabase.energy",
"id": 5093
}
}
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({
status: 1,
distance: 0,
locality: 'Hurghada 2',
stateProvince: 'Red Sea Governorate',
stateProvinceCode: 'Red Sea Governorate',
country: 'Egypt',
countryCode: 'EG',
region: 'Africa',
source: 'Meteonorm - 27.323N - 33.607E.xlsx',
stationName: '',
format: 3,
stationCode: null,
latitude: 27.3230667,
longitude: 33.6068764,
elevation: 127,
timeZone: 2,
timestampDefinition: 0,
timestampDefinitionOriginal: 0,
timeInterval: 60,
startDate: '2005-01-01T00:00:00',
endDate: '2005-12-31T23:00:00',
globalHorizontalIrradianceSum: 2081.92,
diffuseHorizontalIrradianceSum: 757.37,
directNormalIrradianceSum: 2054.86,
planeOfArrayIrradianceSum: null,
averageAirTemperature: 25.44,
maxAirTemperature: 41.52,
averageRelativeHumidity: 41.54,
averageWindSpeed: 5.92,
averagePrecipitableWater: null,
averageDewpoint: null,
averageSoilingLoss: null,
rainfallSum: null,
weatherDataModelVersion: '8.0.4.19761',
dataProvider: 4,
pLevel: 0,
windSensorHeight: 10,
weatherDetails: null,
dataType: 1,
customerName: '',
apiLocked: false,
apiDownloaded: false,
weatherFileKey: '00000000-0000-0000-0000-000000000000',
offsetMinutes: 0,
usingFirstSolarKey: false,
moduleTilt: null,
moduleAzimuth: null,
trackingType: null,
trackingBacktrackingType: 0,
minimumTrackingLimitAngleD: 0,
maximumTrackingLimitAngleD: null,
trackerPitchAngleD: 0,
trackerStowAngle: 0,
groundCoverageRatio: null,
id: 65731,
name: 'Meteonorm - 27.323N - 33.607E',
description: null,
companyId: 1042,
company: null,
ownerId: 5093,
owner: {
claims: [],
logins: [],
roles: [],
company: null,
companyId: 1042,
firstName: 'Jesse',
lastName: 'Milam',
jobTitle: 'Software Developer',
createdByUserId: 5091,
createdByUser: null,
status: 1,
settings: null,
costCenter: null,
migrationAgreementAcceptance: true,
clientCredentialsCreatedOnUTC: '2021-11-30T14:16:05.783',
email: 'jmilam@terabase.energy',
id: 5093
},
createdDate: '2021-12-02T18:12:46.897',
lastModified: '2021-12-02T18:12:46.897',
lastModifiedById: 5093,
lastModifiedBy: {
claims: [],
logins: [],
roles: [],
company: null,
companyId: 1042,
firstName: 'Jesse',
lastName: 'Milam',
jobTitle: 'Software Developer',
createdByUserId: 5091,
createdByUser: null,
status: 1,
settings: null,
costCenter: null,
migrationAgreementAcceptance: true,
clientCredentialsCreatedOnUTC: '2021-11-30T14:16:05.783',
email: 'jmilam@terabase.energy',
id: 5093
}
})
};
fetch('https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate', 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/Weather/{weatherId}/TitleUpdate",
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([
'status' => 1,
'distance' => 0,
'locality' => 'Hurghada 2',
'stateProvince' => 'Red Sea Governorate',
'stateProvinceCode' => 'Red Sea Governorate',
'country' => 'Egypt',
'countryCode' => 'EG',
'region' => 'Africa',
'source' => 'Meteonorm - 27.323N - 33.607E.xlsx',
'stationName' => '',
'format' => 3,
'stationCode' => null,
'latitude' => 27.3230667,
'longitude' => 33.6068764,
'elevation' => 127,
'timeZone' => 2,
'timestampDefinition' => 0,
'timestampDefinitionOriginal' => 0,
'timeInterval' => 60,
'startDate' => '2005-01-01T00:00:00',
'endDate' => '2005-12-31T23:00:00',
'globalHorizontalIrradianceSum' => 2081.92,
'diffuseHorizontalIrradianceSum' => 757.37,
'directNormalIrradianceSum' => 2054.86,
'planeOfArrayIrradianceSum' => null,
'averageAirTemperature' => 25.44,
'maxAirTemperature' => 41.52,
'averageRelativeHumidity' => 41.54,
'averageWindSpeed' => 5.92,
'averagePrecipitableWater' => null,
'averageDewpoint' => null,
'averageSoilingLoss' => null,
'rainfallSum' => null,
'weatherDataModelVersion' => '8.0.4.19761',
'dataProvider' => 4,
'pLevel' => 0,
'windSensorHeight' => 10,
'weatherDetails' => null,
'dataType' => 1,
'customerName' => '',
'apiLocked' => false,
'apiDownloaded' => false,
'weatherFileKey' => '00000000-0000-0000-0000-000000000000',
'offsetMinutes' => 0,
'usingFirstSolarKey' => false,
'moduleTilt' => null,
'moduleAzimuth' => null,
'trackingType' => null,
'trackingBacktrackingType' => 0,
'minimumTrackingLimitAngleD' => 0,
'maximumTrackingLimitAngleD' => null,
'trackerPitchAngleD' => 0,
'trackerStowAngle' => 0,
'groundCoverageRatio' => null,
'id' => 65731,
'name' => 'Meteonorm - 27.323N - 33.607E',
'description' => null,
'companyId' => 1042,
'company' => null,
'ownerId' => 5093,
'owner' => [
'claims' => [
],
'logins' => [
],
'roles' => [
],
'company' => null,
'companyId' => 1042,
'firstName' => 'Jesse',
'lastName' => 'Milam',
'jobTitle' => 'Software Developer',
'createdByUserId' => 5091,
'createdByUser' => null,
'status' => 1,
'settings' => null,
'costCenter' => null,
'migrationAgreementAcceptance' => true,
'clientCredentialsCreatedOnUTC' => '2021-11-30T14:16:05.783',
'email' => 'jmilam@terabase.energy',
'id' => 5093
],
'createdDate' => '2021-12-02T18:12:46.897',
'lastModified' => '2021-12-02T18:12:46.897',
'lastModifiedById' => 5093,
'lastModifiedBy' => [
'claims' => [
],
'logins' => [
],
'roles' => [
],
'company' => null,
'companyId' => 1042,
'firstName' => 'Jesse',
'lastName' => 'Milam',
'jobTitle' => 'Software Developer',
'createdByUserId' => 5091,
'createdByUser' => null,
'status' => 1,
'settings' => null,
'costCenter' => null,
'migrationAgreementAcceptance' => true,
'clientCredentialsCreatedOnUTC' => '2021-11-30T14:16:05.783',
'email' => 'jmilam@terabase.energy',
'id' => 5093
]
]),
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/Weather/{weatherId}/TitleUpdate"
payload := strings.NewReader("{\n \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n }\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/Weather/{weatherId}/TitleUpdate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plantpredict.terabase.energy/Weather/{weatherId}/TitleUpdate")
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 \"status\": 1,\n \"distance\": 0,\n \"locality\": \"Hurghada 2\",\n \"stateProvince\": \"Red Sea Governorate\",\n \"stateProvinceCode\": \"Red Sea Governorate\",\n \"country\": \"Egypt\",\n \"countryCode\": \"EG\",\n \"region\": \"Africa\",\n \"source\": \"Meteonorm - 27.323N - 33.607E.xlsx\",\n \"stationName\": \"\",\n \"format\": 3,\n \"stationCode\": null,\n \"latitude\": 27.3230667,\n \"longitude\": 33.6068764,\n \"elevation\": 127,\n \"timeZone\": 2,\n \"timestampDefinition\": 0,\n \"timestampDefinitionOriginal\": 0,\n \"timeInterval\": 60,\n \"startDate\": \"2005-01-01T00:00:00\",\n \"endDate\": \"2005-12-31T23:00:00\",\n \"globalHorizontalIrradianceSum\": 2081.92,\n \"diffuseHorizontalIrradianceSum\": 757.37,\n \"directNormalIrradianceSum\": 2054.86,\n \"planeOfArrayIrradianceSum\": null,\n \"averageAirTemperature\": 25.44,\n \"maxAirTemperature\": 41.52,\n \"averageRelativeHumidity\": 41.54,\n \"averageWindSpeed\": 5.92,\n \"averagePrecipitableWater\": null,\n \"averageDewpoint\": null,\n \"averageSoilingLoss\": null,\n \"rainfallSum\": null,\n \"weatherDataModelVersion\": \"8.0.4.19761\",\n \"dataProvider\": 4,\n \"pLevel\": 0,\n \"windSensorHeight\": 10,\n \"weatherDetails\": null,\n \"dataType\": 1,\n \"customerName\": \"\",\n \"apiLocked\": false,\n \"apiDownloaded\": false,\n \"weatherFileKey\": \"00000000-0000-0000-0000-000000000000\",\n \"offsetMinutes\": 0,\n \"usingFirstSolarKey\": false,\n \"moduleTilt\": null,\n \"moduleAzimuth\": null,\n \"trackingType\": null,\n \"trackingBacktrackingType\": 0,\n \"minimumTrackingLimitAngleD\": 0,\n \"maximumTrackingLimitAngleD\": null,\n \"trackerPitchAngleD\": 0,\n \"trackerStowAngle\": 0,\n \"groundCoverageRatio\": null,\n \"id\": 65731,\n \"name\": \"Meteonorm - 27.323N - 33.607E\",\n \"description\": null,\n \"companyId\": 1042,\n \"company\": null,\n \"ownerId\": 5093,\n \"owner\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\n },\n \"createdDate\": \"2021-12-02T18:12:46.897\",\n \"lastModified\": \"2021-12-02T18:12:46.897\",\n \"lastModifiedById\": 5093,\n \"lastModifiedBy\": {\n \"claims\": [],\n \"logins\": [],\n \"roles\": [],\n \"company\": null,\n \"companyId\": 1042,\n \"firstName\": \"Jesse\",\n \"lastName\": \"Milam\",\n \"jobTitle\": \"Software Developer\",\n \"createdByUserId\": 5091,\n \"createdByUser\": null,\n \"status\": 1,\n \"settings\": null,\n \"costCenter\": null,\n \"migrationAgreementAcceptance\": true,\n \"clientCredentialsCreatedOnUTC\": \"2021-11-30T14:16:05.783\",\n \"email\": \"jmilam@terabase.energy\",\n \"id\": 5093\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."
]
}
}"Project not found.""An error has occurred."