curl --request POST \
--url https://api.eddy.engineer/v1/power.route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"async": true,
"network": {},
"network_key": "<string>",
"project": "<string>",
"raster_keys": {},
"route": {},
"route_key": "<string>",
"terrain_keys": [
"<string>"
],
"variant": "<string>",
"vector_keys": {}
}
'import requests
url = "https://api.eddy.engineer/v1/power.route"
payload = {
"async": True,
"network": {},
"network_key": "<string>",
"project": "<string>",
"raster_keys": {},
"route": {},
"route_key": "<string>",
"terrain_keys": ["<string>"],
"variant": "<string>",
"vector_keys": {}
}
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({
async: true,
network: {},
network_key: '<string>',
project: '<string>',
raster_keys: {},
route: {},
route_key: '<string>',
terrain_keys: ['<string>'],
variant: '<string>',
vector_keys: {}
})
};
fetch('https://api.eddy.engineer/v1/power.route', 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.route",
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([
'async' => true,
'network' => [
],
'network_key' => '<string>',
'project' => '<string>',
'raster_keys' => [
],
'route' => [
],
'route_key' => '<string>',
'terrain_keys' => [
'<string>'
],
'variant' => '<string>',
'vector_keys' => [
]
]),
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.route"
payload := strings.NewReader("{\n \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\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.route")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.route")
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 \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Route selection for a new line: least-cost routes and alternatives between two substations on a cost surface from land-use, protected-area, native title and slope layers; easements, areas by land-use class, features crossed, visual exposure, the line's impedance and a TP13 candidate (`ss.power.route.result/1`)
curl --request POST \
--url https://api.eddy.engineer/v1/power.route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"async": true,
"network": {},
"network_key": "<string>",
"project": "<string>",
"raster_keys": {},
"route": {},
"route_key": "<string>",
"terrain_keys": [
"<string>"
],
"variant": "<string>",
"vector_keys": {}
}
'import requests
url = "https://api.eddy.engineer/v1/power.route"
payload = {
"async": True,
"network": {},
"network_key": "<string>",
"project": "<string>",
"raster_keys": {},
"route": {},
"route_key": "<string>",
"terrain_keys": ["<string>"],
"variant": "<string>",
"vector_keys": {}
}
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({
async: true,
network: {},
network_key: '<string>',
project: '<string>',
raster_keys: {},
route: {},
route_key: '<string>',
terrain_keys: ['<string>'],
variant: '<string>',
vector_keys: {}
})
};
fetch('https://api.eddy.engineer/v1/power.route', 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.route",
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([
'async' => true,
'network' => [
],
'network_key' => '<string>',
'project' => '<string>',
'raster_keys' => [
],
'route' => [
],
'route_key' => '<string>',
'terrain_keys' => [
'<string>'
],
'variant' => '<string>',
'vector_keys' => [
]
]),
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.route"
payload := strings.NewReader("{\n \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\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.route")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.route")
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 \"async\": true,\n \"network\": {},\n \"network_key\": \"<string>\",\n \"project\": \"<string>\",\n \"raster_keys\": {},\n \"route\": {},\n \"route_key\": \"<string>\",\n \"terrain_keys\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\",\n \"vector_keys\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
true: run as a job and answer 202 with job_id, poll and events; the finished job's result is this route's body without the inline result (read result_key's blob, or page it with power_contingency_page). false: always inline. Left out: inline up to an estimated work of 5e6 bus-solves (SS_POWER_PLANNING_SYNC_WORK; N-1 of a 2,000-bus case is about 7e6, an AC OPF of 13,659 buses 9e6), a job above. Above 2e5 (SS_POWER_PLANNING_LIGHT_WORK) a study takes a slot of PW12's heavy lane
Response
study, schema, result_key (BLAKE3 of the result's canonical bytes; blob_uri reads it, report_uri is its certificate, which verify_result runs again), request_key, documents (the route document, the terrain, vector and raster layers, the network, by content key), summary, elapsed_ms, work, vectors {alignments, easements, corridor} (stored lon/lat drawings), candidate_network_key (with a network and a candidate), result_inline, and result: document, grid, cell_metres, endpoints, terrain, layers (each with its role, source key, on-grid key, features and cells, credit, note), cost (TP14's ss.spatial.cost/1), cost_key, routes (rank, cost, stretch, moves, alignment, alignment_lonlat, length_m, geodesic_length_m, easement, land, crossings, exposure, impedance), stopped, corridor, candidate, findings, invented, credits, method, caveat
The response is of type object.