curl --request POST \
--url https://api.eddy.engineer/v1/power.report \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"result_key": "<string>",
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/power.report"
payload = {
"result_key": "<string>",
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
result_key: '<string>',
titles: {
checked_by: '<string>',
client: '<string>',
date: '<string>',
drawn_by: '<string>',
project: '<string>',
revision: '<string>'
}
})
};
fetch('https://api.eddy.engineer/v1/power.report', 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.eddy.engineer/v1/power.report",
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([
'result_key' => '<string>',
'titles' => [
'checked_by' => '<string>',
'client' => '<string>',
'date' => '<string>',
'drawn_by' => '<string>',
'project' => '<string>',
'revision' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.eddy.engineer/v1/power.report"
payload := strings.NewReader("{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.eddy.engineer/v1/power.report")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}A study report: one stored power study result laid out as a report (`ss.power.report/1`) with HTML, PDF and its sheets
Takes the result_key a power study answered (power_loadflow, power_shortcircuit, power_coordination, power_arcflash, power_arcflash_labels, power_sizing, the motor starting and harmonic studies, and the rest: all fifteen) and lays the stored result out as a report of eight sections: summary; inputs (the network, the study case, the settings in force with which were defaults); method, with what it is cited to (a standard is named by its number only, never quoted); the value tables and device libraries the study read, by id, revision and content key; the results as tables; the findings, with the network document’s own checks; what was not studied and why; and the record (the keys the result is read and verified by). The network, case, settings, tables and libraries are read from the result’s own run record, so nothing is passed again. Nothing is calculated: a cell is a member of the result at five significant figures in the unit the result holds it in, and a quantity the result does not hold is said to be missing. With the report come the sheets that belong to the study, as SVG on paper with a frame and a title block: the single-line diagram with the result written on it for a load flow (voltages, flows, loading), a fault study (initial and peak currents at each bus) and an arc flash study (incident energy, boundary, PPE category); a time-current sheet for each protection path a coordination study checked (the plot of the path’s devices with the failing checks marked, and the devices, settings and margins beside it); the plot on a sheet for power_tcc; and the labels of power_arcflash_labels six to an A4 sheet, each unchanged. A bus is drawn where the network document places it when every bus has a position; otherwise the engine places every bus by its distance in branches from the supply, and the sheet says so. Deterministic: the same result and titles give the same bytes, and verify_result on the report’s key makes it again. Refused by name: POWER_REQUEST (400: the body, an unknown member, a key that is not b3: and 64 hex digits, titles that do not read or cannot be printed, a format that is not one of the route’s), POWER_RESULT_NOT_FOUND (404: no power study result under that key), POWER_NETWORK_NOT_FOUND (404: the network the result was run on is no longer stored), POWER_LIBRARY_NOT_FOUND (404) and POWER_VALUE_TABLE (422): a device library or value table a coordination or plot study stood on is no longer stored, POWER_REPORT_INVALID (422: the key names a report or a set and not a study’s result; results of different networks in one set; a result given twice).
curl --request POST \
--url https://api.eddy.engineer/v1/power.report \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"result_key": "<string>",
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/power.report"
payload = {
"result_key": "<string>",
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
result_key: '<string>',
titles: {
checked_by: '<string>',
client: '<string>',
date: '<string>',
drawn_by: '<string>',
project: '<string>',
revision: '<string>'
}
})
};
fetch('https://api.eddy.engineer/v1/power.report', 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.eddy.engineer/v1/power.report",
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([
'result_key' => '<string>',
'titles' => [
'checked_by' => '<string>',
'client' => '<string>',
'date' => '<string>',
'drawn_by' => '<string>',
'project' => '<string>',
'revision' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.eddy.engineer/v1/power.report"
payload := strings.NewReader("{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.eddy.engineer/v1/power.report")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"result_key\": \"<string>\",\n \"titles\": {\n \"checked_by\": \"<string>\",\n \"client\": \"<string>\",\n \"date\": \"<string>\",\n \"drawn_by\": \"<string>\",\n \"project\": \"<string>\",\n \"revision\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
json (the default) answers the body below; html answers the report as one self-contained page that prints on A4; pdf answers it as a PDF with a text layer. The headers x-eddy-key and x-eddy-result-key then carry the file's and the report document's keys
json, html, pdf Response
kind (report), schema (ss.power.report/1), title, result_key (BLAKE3 of the report document's canonical bytes; blob_uri reads it, report_uri is its certificate), request_key, network {key, name}, studies (the study, its result key and case), titles, files: each file with name, title, kind (report_html, report_pdf, report the document, diagram, tcc, labels, and index in a set), media_type, key and blob_uri (read it with get_blob), bytes, and for a sheet its number sheet, notes (what could not be drawn, and why), and document: the report itself, as sections of text, facts and table blocks
The response is of type object.