Engine API 0.1-draft¶
Warning
A proposal: no engine implements it yet. The viewer talks to scripts/mock-engine.mjs.
Default address: http://127.0.0.1:8765. OpenAPI file.
Endpoints¶
GET /health¶
Engine identity and capabilities
- Response 200:
application/json(Health)
GET /bundles¶
Bundles the engine can simulate (bundle_id must match the manifest's)
- Response 200:
application/json(array of BundleRef)
POST /simulate¶
Re-simulate one bundle with parameter overrides and knockouts
- Request:
SimulateRequest - Response 200:
application/vnd.apache.arrow.stream,application/json(SimulateResult)
POST /simulate/batch¶
- Request:
object - Response 200:
application/json(object)
POST /verify¶
Does the engine reproduce the bundle's stored best-fit trajectories?
- Request:
object - Response 200:
application/json(Verify)
Schemas¶
Health¶
| Property | Type | Required | Notes |
|---|---|---|---|
status |
ok \ | degraded | yes |
engine |
string | yes | e.g. pktengine |
version |
string | yes | |
commit |
string | yes | |
api_version |
string | ||
capabilities |
object | yes |
BundleRef¶
| Property | Type | Required | Notes |
|---|---|---|---|
bundle_id |
string | yes | |
model_id |
string | ||
variant |
string |
SimulateRequest¶
| Property | Type | Required | Notes |
|---|---|---|---|
bundle_id |
string | yes | |
parameters |
object | name -> value (physical space) | |
knockouts |
array of object | ||
times |
array of number |
SimulateResult¶
| Property | Type | Required | Notes |
|---|---|---|---|
engine |
string | yes | |
version |
string | yes | |
rows |
array of object | yes |
Verify¶
| Property | Type | Required | Notes |
|---|---|---|---|
bundle_id |
string | yes | |
reproduces |
boolean | yes | |
max_abs_diff |
number | yes | |
tolerance |
number | yes | |
n_compared |
integer | yes | |
note |
string |