Create Module (File Upload)
curl --request POST \
--url https://api.example.com/modulesimport requests
url = "https://api.example.com/modules"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/modules', 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.example.com/modules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/modules"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/modules")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/modules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyModules
Create Module (File Upload)
Create a PV module by uploading a .pan equipment file
POST
/
modules
Create Module (File Upload)
curl --request POST \
--url https://api.example.com/modulesimport requests
url = "https://api.example.com/modules"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/modules', 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.example.com/modules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/modules"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/modules")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/modules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyPOST /modules
Upload a.pan equipment file to create a new PV module in the workspace. The server parses the file to extract module electrical properties (Voc, Isc, Pmax, temperature coefficients, dimensions, etc.) and the Angle of Incidence (AOI) curve, then stores the module.
Notes
- Requires a valid JWT with write access to the workspace.
- The request body must be
multipart/form-datawith a singlefilefield containing the.panfile. - The module name is derived from the uploaded filename (without the
.panextension). - Returns
400if the.panfile cannot be parsed. - Properties are stored as a flexible key-value dictionary reflecting the uploaded file structure.
- If you already have structured module data and do not have a
.panfile, usePOST /modules/jsoninstead.
