Diesel2 prototype (proto1). Design: Diesel2Design.
Checking…
GET /api/v2/healthversion and topic countGET /api/v2/stylesstylesheets: {total, default, current, data}; HTML twin /stylesGET /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>POST /api/v2/diesel/parse{source} → {ok, errors, decls}POST /api/v2/diesel/expr{source, lenient?, ast?, vars?} → {ok, results[]}; one statement per line, open (no token): evaluation is purePOST /api/v2/diesel/resetback to the demo: topics, domain and objects reload from the seed topics; needs the tokenPOST /api/v2/diesel/run{spec, story, scratch?} → {ok, phase, errors, payload, flow, tests, trace}; spec/story are text or {topic}GET /api/v2/domain/overviewclasses, their links, enums, and the model checks (errors, warnings); HTML twin /domain/overviewGET /api/v2/domain/cat/*every class in full: fields, kinds, annotations, inverses, messagesGET /api/v2/domain/cat/A,Bsome classes in full; HTML twin /domain/cat/AGET /api/v2/dom/val/Companylist: {total, class, data}; ?query= an expression over the fields, ?limit= ?offset=; HTML twin /dom/val/CompanyGET /api/v2/dom/val/Company?query=stage%20is%20%22Producer%22the query in actionGET /api/v2/dom/val/Company:FLRone object by WPATH ([d2.]Class:key); HTML twin /dom/val/Company:FLRPUT|DELETE /api/v2/dom/val/Class:keyupsert (the URL key fills the key field) or delete; checked against the classPOST /api/v2/dom/val/Classcreate; 409 if the key existsGET|PUT|DELETE /api/v2/dom/<Class>/<key>the v0.1 form, kept as an aliascurl -s https://d2.aidieselapps.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 and diesel/expr are open; other writes (PUT, POST, DELETE) need a bearer token. Admin API (/admin/*) is separate and token-only.