d2 0.1.2
Diesel2 prototype (proto1). Spec: metals.Topic:Diesel2 · design: metals.Topic:Diesel2Design
…
Service
GET /api/v2/healthversion and topic count
Topics (markdown sources)
GET /api/v2/topicslist: {total, category, data}GET /api/v2/topics/<name>markdown body; ?format=json for the envelopePUT /api/v2/topics/<name>body = markdown; stored even if broken, parse errors returnedDELETE /api/v2/topics/<name>
Language
POST /api/v2/diesel/parse{source} → {ok, errors, decls}POST /api/v2/diesel/run{spec, story, scratch?} → {ok, phase, errors, payload, flow, tests, trace}; spec/story are text or {topic}
Domain
GET /api/v2/domain/overviewclasses from stored topicsGET /api/v2/domain/cat/A,Bdetailed class definitions
Objects
GET /api/v2/dom/<Class>list: {total, category, data}GET|PUT|DELETE /api/v2/dom/<Class>/<key>one entity; PUT fills the key field from the URL
Try it
curl -s https://d2.dieselapps.com/api/v2/diesel/run \
-H 'content-type: application/json' -H 'authorization: Bearer $D2_TOKEN' \
-d '{"spec":"$when hello (who) => (payload = \"hi \" + who)","story":"$send hello (who = \"d2\")\n$expect payload == \"hi d2\""}'
Reads are open; writes (PUT, POST, DELETE) need a bearer token. Admin API (/admin/*) is separate and token-only.