The autorouter as a job: open connections in scope walked around one by one; sync while few, else 202 + JobRef (E7.10)
curl --request POST \
--url https://api.eddy.engineer/v1/eda.autoroute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"document": {},
"async": true,
"class": "<string>",
"component": "<string>",
"components": [
"<string>"
],
"grid": 123,
"layers": [
"<string>"
],
"max_connections": 123,
"max_sync": 123,
"net": "<string>",
"pads": [
"<string>"
],
"rect": [
123
],
"room": "<string>",
"rules": {},
"scope": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/eda.autoroute"
payload = {
"document": {},
"async": True,
"class": "<string>",
"component": "<string>",
"components": ["<string>"],
"grid": 123,
"layers": ["<string>"],
"max_connections": 123,
"max_sync": 123,
"net": "<string>",
"pads": ["<string>"],
"rect": [123],
"room": "<string>",
"rules": {},
"scope": "<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({
document: {},
async: true,
class: '<string>',
component: '<string>',
components: ['<string>'],
grid: 123,
layers: ['<string>'],
max_connections: 123,
max_sync: 123,
net: '<string>',
pads: ['<string>'],
rect: [123],
room: '<string>',
rules: {},
scope: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/eda.autoroute', 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/eda.autoroute",
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([
'document' => [
],
'async' => true,
'class' => '<string>',
'component' => '<string>',
'components' => [
'<string>'
],
'grid' => 123,
'layers' => [
'<string>'
],
'max_connections' => 123,
'max_sync' => 123,
'net' => '<string>',
'pads' => [
'<string>'
],
'rect' => [
123
],
'room' => '<string>',
'rules' => [
],
'scope' => '<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/eda.autoroute"
payload := strings.NewReader("{\n \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\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/eda.autoroute")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/eda.autoroute")
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 \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connections": 123,
"document": {},
"document_hash": "<string>",
"result": {},
"route_key": "<string>"
}{
"events": "<string>",
"job_id": "<string>",
"phase": "<string>",
"poll": "<string>"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Circuits (EDA)
The autorouter as a job: open connections in scope walked around one by one; sync while few, else 202 + JobRef (E7.10)
Scopes: all | net {net} | net_class {class} | connection {pads: [a, b]} | component {component} | component_class {class} | selected {components} | between {components: [a, b]} | area {rect} | room {room}. `layers` (copper ids, default all), `grid`, `max_connections`, `corner`. The routed tracks carry one `union` (Reset = remove that union). Deterministic: the same document + request yields the same tracks; `async: true` or more open connections than `max_sync` (default 64) returns 202 with a job at /v1/jobs/{id} whose done phase carries the same result the sync path returns; the job id is the content address of the request. R10: `relax` routes every track at its rule's minimum width and the smallest via the rules allow (each rule still holds, at less margin). `result.issues` lists each connection not made as `ss.issue/1` with its code (`ROUTE_NO_PATH`, `ROUTE_CONFLICT`, `ROUTE_FAILED`, also on each `failed_list` entry); where the preferred widths left connections unrouted and the rules allow narrower, `result.questions` asks `EDA_RELAX_NETCLASS` (P5), answered by `relax`.
POST
/
v1
/
eda.autoroute
The autorouter as a job: open connections in scope walked around one by one; sync while few, else 202 + JobRef (E7.10)
curl --request POST \
--url https://api.eddy.engineer/v1/eda.autoroute \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"document": {},
"async": true,
"class": "<string>",
"component": "<string>",
"components": [
"<string>"
],
"grid": 123,
"layers": [
"<string>"
],
"max_connections": 123,
"max_sync": 123,
"net": "<string>",
"pads": [
"<string>"
],
"rect": [
123
],
"room": "<string>",
"rules": {},
"scope": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/eda.autoroute"
payload = {
"document": {},
"async": True,
"class": "<string>",
"component": "<string>",
"components": ["<string>"],
"grid": 123,
"layers": ["<string>"],
"max_connections": 123,
"max_sync": 123,
"net": "<string>",
"pads": ["<string>"],
"rect": [123],
"room": "<string>",
"rules": {},
"scope": "<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({
document: {},
async: true,
class: '<string>',
component: '<string>',
components: ['<string>'],
grid: 123,
layers: ['<string>'],
max_connections: 123,
max_sync: 123,
net: '<string>',
pads: ['<string>'],
rect: [123],
room: '<string>',
rules: {},
scope: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/eda.autoroute', 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/eda.autoroute",
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([
'document' => [
],
'async' => true,
'class' => '<string>',
'component' => '<string>',
'components' => [
'<string>'
],
'grid' => 123,
'layers' => [
'<string>'
],
'max_connections' => 123,
'max_sync' => 123,
'net' => '<string>',
'pads' => [
'<string>'
],
'rect' => [
123
],
'room' => '<string>',
'rules' => [
],
'scope' => '<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/eda.autoroute"
payload := strings.NewReader("{\n \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\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/eda.autoroute")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/eda.autoroute")
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 \"document\": {},\n \"async\": true,\n \"class\": \"<string>\",\n \"component\": \"<string>\",\n \"components\": [\n \"<string>\"\n ],\n \"grid\": 123,\n \"layers\": [\n \"<string>\"\n ],\n \"max_connections\": 123,\n \"max_sync\": 123,\n \"net\": \"<string>\",\n \"pads\": [\n \"<string>\"\n ],\n \"rect\": [\n 123\n ],\n \"room\": \"<string>\",\n \"rules\": {},\n \"scope\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connections": 123,
"document": {},
"document_hash": "<string>",
"result": {},
"route_key": "<string>"
}{
"events": "<string>",
"job_id": "<string>",
"phase": "<string>",
"poll": "<string>"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json