curl --request POST \
--url https://api.eddy.engineer/v1/earthing.sheets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"documents": {
"results": [
"<unknown>"
],
"risk": "<unknown>",
"soil": "<unknown>",
"survey": "<unknown>",
"system": "<unknown>",
"vectors": [
"<unknown>"
]
},
"test_plan": {
"current_probe_m": 123,
"fop_bearings_deg": [
123
],
"injection_current_a": 123,
"points": [
[
123
]
],
"return_electrode": [
123
],
"traverse": "<array>"
},
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/earthing.sheets"
payload = {
"documents": {
"results": ["<unknown>"],
"risk": "<unknown>",
"soil": "<unknown>",
"survey": "<unknown>",
"system": "<unknown>",
"vectors": ["<unknown>"]
},
"test_plan": {
"current_probe_m": 123,
"fop_bearings_deg": [123],
"injection_current_a": 123,
"points": [[123]],
"return_electrode": [123],
"traverse": "<array>"
},
"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({
documents: {
results: ['<unknown>'],
risk: '<unknown>',
soil: '<unknown>',
survey: '<unknown>',
system: '<unknown>',
vectors: ['<unknown>']
},
test_plan: {
current_probe_m: 123,
fop_bearings_deg: [123],
injection_current_a: 123,
points: [[123]],
return_electrode: [123],
traverse: '<array>'
},
titles: {
checked_by: '<string>',
client: '<string>',
date: '<string>',
drawn_by: '<string>',
project: '<string>',
revision: '<string>'
}
})
};
fetch('https://api.eddy.engineer/v1/earthing.sheets', 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/earthing.sheets",
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([
'documents' => [
'results' => [
'<unknown>'
],
'risk' => '<unknown>',
'soil' => '<unknown>',
'survey' => '<unknown>',
'system' => '<unknown>',
'vectors' => [
'<unknown>'
]
],
'test_plan' => [
'current_probe_m' => 123,
'fop_bearings_deg' => [
123
],
'injection_current_a' => 123,
'points' => [
[
123
]
],
'return_electrode' => [
123
],
'traverse' => '<array>'
],
'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/earthing.sheets"
payload := strings.NewReader("{\n \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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/earthing.sheets")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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/earthing.sheets")
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 \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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>"
}
}The earthing set: every report its documents allow, the hazard zone drawings and an index, with a hash manifest (`ss.earthing.reportset/1`), or as one zip
Makes the printable set of an earthing study from its documents: the soil report (given a soil document), the design report (given a system), the risk assessment (given a risk study) and the test plan (given a system, a soil and test_plan), each as HTML, PDF and its document; the hazard zone drawings, one SVG sheet per result and quantity with a zones or contours document (EG10’s EPR and transferred-potential zones and contours, EG7’s areas over a limit), drawn north up at a standard scale over the system, its fences and the services, with a frame and title block, a legend, a scale bar, and the table of services crossing the zones (or the worst figure of each part of the site against its limit), rows that do not fit continued on further sheets; and an index page linking every file. The manifest names every file by the BLAKE3 of its bytes. What cannot be made (a report whose documents were not given, a zones document a result names and that was not given) is a note in the manifest and on the index. Every table of a report ends with the references it stands on (publications by author, the engine’s methods, the documents by key, and a value table’s entries by table, key, standard and edition); a value from a customer’s value table is cited, never printed bare, and a paid table’s contents are never listed. Nothing is calculated except the test plan’s predictions, which are EG12’s: a cell is a member of a document at five significant figures in the unit the document holds it in. Deterministic: the same documents and titles give the same bytes, and verify_result on the answer’s key makes it again from the stored documents. Refused by name: EARTHING_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 the route’s), EARTHING_DOCUMENT_NOT_FOUND (404: nothing stored under a key), EARTHING_DOCUMENT_INVALID (422: a document that does not read as what it is given as, or a key whose bytes are not that document’s canonical form), EARTHING_REPORT_INVALID (422: documents that do not belong together, a document twice, a report its documents cannot make, a test plan EG12 cannot make).
curl --request POST \
--url https://api.eddy.engineer/v1/earthing.sheets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"documents": {
"results": [
"<unknown>"
],
"risk": "<unknown>",
"soil": "<unknown>",
"survey": "<unknown>",
"system": "<unknown>",
"vectors": [
"<unknown>"
]
},
"test_plan": {
"current_probe_m": 123,
"fop_bearings_deg": [
123
],
"injection_current_a": 123,
"points": [
[
123
]
],
"return_electrode": [
123
],
"traverse": "<array>"
},
"titles": {
"checked_by": "<string>",
"client": "<string>",
"date": "<string>",
"drawn_by": "<string>",
"project": "<string>",
"revision": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/earthing.sheets"
payload = {
"documents": {
"results": ["<unknown>"],
"risk": "<unknown>",
"soil": "<unknown>",
"survey": "<unknown>",
"system": "<unknown>",
"vectors": ["<unknown>"]
},
"test_plan": {
"current_probe_m": 123,
"fop_bearings_deg": [123],
"injection_current_a": 123,
"points": [[123]],
"return_electrode": [123],
"traverse": "<array>"
},
"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({
documents: {
results: ['<unknown>'],
risk: '<unknown>',
soil: '<unknown>',
survey: '<unknown>',
system: '<unknown>',
vectors: ['<unknown>']
},
test_plan: {
current_probe_m: 123,
fop_bearings_deg: [123],
injection_current_a: 123,
points: [[123]],
return_electrode: [123],
traverse: '<array>'
},
titles: {
checked_by: '<string>',
client: '<string>',
date: '<string>',
drawn_by: '<string>',
project: '<string>',
revision: '<string>'
}
})
};
fetch('https://api.eddy.engineer/v1/earthing.sheets', 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/earthing.sheets",
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([
'documents' => [
'results' => [
'<unknown>'
],
'risk' => '<unknown>',
'soil' => '<unknown>',
'survey' => '<unknown>',
'system' => '<unknown>',
'vectors' => [
'<unknown>'
]
],
'test_plan' => [
'current_probe_m' => 123,
'fop_bearings_deg' => [
123
],
'injection_current_a' => 123,
'points' => [
[
123
]
],
'return_electrode' => [
123
],
'traverse' => '<array>'
],
'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/earthing.sheets"
payload := strings.NewReader("{\n \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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/earthing.sheets")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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/earthing.sheets")
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 \"documents\": {\n \"results\": [\n \"<unknown>\"\n ],\n \"risk\": \"<unknown>\",\n \"soil\": \"<unknown>\",\n \"survey\": \"<unknown>\",\n \"system\": \"<unknown>\",\n \"vectors\": [\n \"<unknown>\"\n ]\n },\n \"test_plan\": {\n \"current_probe_m\": 123,\n \"fop_bearings_deg\": [\n 123\n ],\n \"injection_current_a\": 123,\n \"points\": [\n [\n 123\n ]\n ],\n \"return_electrode\": [\n 123\n ],\n \"traverse\": \"<array>\"\n },\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
Response
kind (set), schema (ss.earthing.reportset/1), title, result_key (BLAKE3 of the manifest's canonical bytes), blob_uri, report_uri, request_key, documents, titles, files: each file with name, title, kind (report_html, report_pdf, report the document, hazard a sheet, index), media_type, key, blob_uri, bytes and for a sheet its number sheet; notes; and document: the manifest (documents by key, reports with each report's hash and files, files by name and hash, notes)
The response is of type object.