curl --request POST \
--url https://api.eddy.engineer/v1/bim.run.batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"commands": [
{
"command": "<string>",
"as": "<string>",
"params": {}
}
],
"fill": "<unknown>",
"key": "<string>",
"project": "<string>",
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.run.batch"
payload = {
"commands": [
{
"command": "<string>",
"as": "<string>",
"params": {}
}
],
"fill": "<unknown>",
"key": "<string>",
"project": "<string>",
"variant": "<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({
commands: [{command: '<string>', as: '<string>', params: {}}],
fill: '<unknown>',
key: '<string>',
project: '<string>',
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.run.batch', 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/bim.run.batch",
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([
'commands' => [
[
'command' => '<string>',
'as' => '<string>',
'params' => [
]
]
],
'fill' => '<unknown>',
'key' => '<string>',
'project' => '<string>',
'variant' => '<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/bim.run.batch"
payload := strings.NewReader("{\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<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/bim.run.batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.run.batch")
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 \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"after": "<string>",
"before": "<string>",
"complete": true,
"filled": "<unknown>",
"handles": {},
"made": "<array>",
"note": "<string>",
"of": 123,
"plan": {},
"project": "<string>",
"ran": 123,
"refused": {},
"schema": "<string>",
"unfilled": "<array>"
}Run many engine commands in order, each an undoable step, with `"$n"` and `"$name"` filled from the ids earlier ones made (`ss.bim.batch/1`, MEP33)
Accept a plan in one call: the commands a layout, a route (commands), water sizing (sizing.commands), air sizing (proposals) or a product binding answers. Or pass plan {tool, body} instead of commands, with project (or key alone): tool is bim_mep_layout, bim_route or bim_water; the plan is made on the project’s head, or on the document key names when there is no project, its commands then accepted as a chain of documents from it and no project changed (any key in body is replaced, and water always proposes sizes), and its commands (sizing.commands for water) are accepted in the same call, so an agent never copies them; plan in the answer is the plan’s summary (the layout’s placed, could_not and defaults, and into a document’s own building its rooms: the first 50 not read, the rest counted, those placed in part and those whose ceiling is the level’s; the route’s complete, measures, finding_counts and first findings; the water’s verdicts and sizing), and a layout’s next is filled without asking. Each command runs through /v1/bim.run as it would alone (on project, a step in its history; on a key, a chain of documents). Before a command runs, any string in its params that is exactly "$n" becomes the first id the n-th command of this batch made, and "$name" the id the command given as: name made; a reference to nothing is refused (BATCH_REFERENCE). The batch stops at the first refusal: the commands before it ran and stay, and the answer names it (refused: index, command, code, message) so the rest can be sent again from there. fill is any JSON (a layout’s next): answered as filled with every "$name", "$n" and "$head" (the head after the batch) it can resolve replaced, and the rest listed in unfilled. At most 2,000 commands and 2 MiB. The answer: before, after (the head now), ran of of, complete, made (each command’s ids), handles (name to id), filled, refused. A project keeps the engine’s own undo limit of steps in its history.
curl --request POST \
--url https://api.eddy.engineer/v1/bim.run.batch \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"commands": [
{
"command": "<string>",
"as": "<string>",
"params": {}
}
],
"fill": "<unknown>",
"key": "<string>",
"project": "<string>",
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.run.batch"
payload = {
"commands": [
{
"command": "<string>",
"as": "<string>",
"params": {}
}
],
"fill": "<unknown>",
"key": "<string>",
"project": "<string>",
"variant": "<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({
commands: [{command: '<string>', as: '<string>', params: {}}],
fill: '<unknown>',
key: '<string>',
project: '<string>',
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.run.batch', 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/bim.run.batch",
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([
'commands' => [
[
'command' => '<string>',
'as' => '<string>',
'params' => [
]
]
],
'fill' => '<unknown>',
'key' => '<string>',
'project' => '<string>',
'variant' => '<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/bim.run.batch"
payload := strings.NewReader("{\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<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/bim.run.batch")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.run.batch")
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 \"commands\": [\n {\n \"command\": \"<string>\",\n \"as\": \"<string>\",\n \"params\": {}\n }\n ],\n \"fill\": \"<unknown>\",\n \"key\": \"<string>\",\n \"project\": \"<string>\",\n \"variant\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"after": "<string>",
"before": "<string>",
"complete": true,
"filled": "<unknown>",
"handles": {},
"made": "<array>",
"note": "<string>",
"of": 123,
"plan": {},
"project": "<string>",
"ran": 123,
"refused": {},
"schema": "<string>",
"unfilled": "<array>"
}