A deterministic SVG chart from a stored result (A8)
curl --request POST \
--url https://api.eddy.engineer/v1/multisim.chart \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"result_key": "<string>",
"agent_type": "<string>",
"chart": {},
"document": {}
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.chart"
payload = {
"result_key": "<string>",
"agent_type": "<string>",
"chart": {},
"document": {}
}
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({result_key: '<string>', agent_type: '<string>', chart: {}, document: {}})
};
fetch('https://api.eddy.engineer/v1/multisim.chart', 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/multisim.chart",
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([
'result_key' => '<string>',
'agent_type' => '<string>',
'chart' => [
],
'document' => [
]
]),
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/multisim.chart"
payload := strings.NewReader("{\n \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\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/multisim.chart")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.chart")
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 \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\n}"
response = http.request(request)
puts response.read_body{
"charts": [
{}
],
"kind": "<string>",
"result_key": "<string>",
"svg": "<string>",
"svg_key": "<string>"
}ProcessSim
A deterministic SVG chart from a stored result (A8)
Renders a chart template against a stored result (result_key from multisim.run / multisim.experiment) with the X5 figure machinery (lab-v1 bytes): kinds time_plot, time_stack, histogram, bar, pie, tornado; series by source - occupancy.<block> and variables.<name> from the frames, stock.<name> from the trajectory, metric.<name>, blocks.<metric>, output.<name>, rows.<output>, population.<pop>, distribution.<output> from the result. With `chart`: that one chart (svg + svg_key). With `document` (+ `agent_type`): every chart template the agent type's presentation declares (TimePlot, TimeStackChart, Histogram, BarChart, PieChart, TornadoChart shapes), each rendered or refused typed. The /multisim page inlines the bytes; it never computes a chart.
POST
/
v1
/
multisim.chart
A deterministic SVG chart from a stored result (A8)
curl --request POST \
--url https://api.eddy.engineer/v1/multisim.chart \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"result_key": "<string>",
"agent_type": "<string>",
"chart": {},
"document": {}
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.chart"
payload = {
"result_key": "<string>",
"agent_type": "<string>",
"chart": {},
"document": {}
}
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({result_key: '<string>', agent_type: '<string>', chart: {}, document: {}})
};
fetch('https://api.eddy.engineer/v1/multisim.chart', 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/multisim.chart",
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([
'result_key' => '<string>',
'agent_type' => '<string>',
'chart' => [
],
'document' => [
]
]),
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/multisim.chart"
payload := strings.NewReader("{\n \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\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/multisim.chart")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.chart")
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 \"result_key\": \"<string>\",\n \"agent_type\": \"<string>\",\n \"chart\": {},\n \"document\": {}\n}"
response = http.request(request)
puts response.read_body{
"charts": [
{}
],
"kind": "<string>",
"result_key": "<string>",
"svg": "<string>",
"svg_key": "<string>"
}Body
application/json