curl --request POST \
--url https://api.eddy.engineer/v1/bim.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"bytes_base64": "<string>",
"key": "<string>",
"name": "<string>",
"params": {},
"text": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.import"
payload = {
"blob": "<string>",
"bytes_base64": "<string>",
"key": "<string>",
"name": "<string>",
"params": {},
"text": "<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({
blob: '<string>',
bytes_base64: '<string>',
key: '<string>',
name: '<string>',
params: {},
text: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.import', 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.import",
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([
'blob' => '<string>',
'bytes_base64' => '<string>',
'key' => '<string>',
'name' => '<string>',
'params' => [
],
'text' => '<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.import"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<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.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.import")
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 \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"before": "<string>",
"candidate": true,
"document": {
"bytes": 123,
"elements": 123,
"format": 123,
"key": "<string>",
"levels": 123,
"name": "<string>"
},
"elements": {},
"format": "<string>",
"key": "<string>",
"left_out": [
"<string>"
],
"left_out_count": 123,
"ports": {},
"reply": {},
"schema": "<string>",
"skipped": [
"<string>"
]
}Import an IFC, .bimcraft, DXF or Revit (.rvt) file as a candidate document (BC4)
An import mints a candidate document and never mutates a model (the I-track doctrine): ifc and rvt read the file into a new document whose GUIDs are minted from the file’s bytes (the same file is the same candidate); bimcraft opens a project file; dxf places the drawing into the document at key through import_cad with params. .rvt needs a build with the rvt feature; one without refuses it by name (RVT_NOT_BUILT, 501). “Autodesk” and “Revit” name the file format only. TL3c: blob (a blob id) instead of text or bytes_base64: the file is read from the blob as the caller and imported exactly as if sent inline; giving both is 400 FILE_GIVEN_TWICE.
curl --request POST \
--url https://api.eddy.engineer/v1/bim.import \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"blob": "<string>",
"bytes_base64": "<string>",
"key": "<string>",
"name": "<string>",
"params": {},
"text": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.import"
payload = {
"blob": "<string>",
"bytes_base64": "<string>",
"key": "<string>",
"name": "<string>",
"params": {},
"text": "<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({
blob: '<string>',
bytes_base64: '<string>',
key: '<string>',
name: '<string>',
params: {},
text: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.import', 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.import",
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([
'blob' => '<string>',
'bytes_base64' => '<string>',
'key' => '<string>',
'name' => '<string>',
'params' => [
],
'text' => '<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.import"
payload := strings.NewReader("{\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<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.import")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.import")
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 \"blob\": \"<string>\",\n \"bytes_base64\": \"<string>\",\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"params\": {},\n \"text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"before": "<string>",
"candidate": true,
"document": {
"bytes": 123,
"elements": 123,
"format": 123,
"key": "<string>",
"levels": 123,
"name": "<string>"
},
"elements": {},
"format": "<string>",
"key": "<string>",
"left_out": [
"<string>"
],
"left_out_count": 123,
"ports": {},
"reply": {},
"schema": "<string>",
"skipped": [
"<string>"
]
}Body
TL3c: a blob id (b3:<64 hex>: an upload's blob_id, an attachment's blob) holding the file, instead of text or bytes_base64: read as the caller under the read gate (a blob the caller may not read answers 404 BLOB_NOT_FOUND, as an absent one) and imported exactly as if its contents were sent inline. Give one of the two (both: 400 FILE_GIVEN_TWICE).
Response
OK
MEP5, an IFC file only: its IfcDistributionPorts and IfcRelConnectsPorts as read (ss.mep.ports/1). given names the families whose components carry the same ports in their own axes and so got them as connectors; findings lists each IMPORTED_LINK_NOT_TOUCHING, a link the file claims whose two ports are farther apart than 1 mm (the model joins only what touches, so they are not connected); left_out says what was not read and why. Ports past 200,000 or links past 200,000 are left out by name and the import goes on