Expand description
Library and spec management endpoints.
§Overview
These endpoints manage Xeto-based ontology libraries at runtime: listing specs, inspecting individual specs, loading/unloading libraries, exporting library source, and validating entities against the ontology.
§Endpoints
POST /api/specs— list specs, optionally filtered bylib(Str). Response:qname,name,lib,base,doc,abstract.POST /api/spec— get single spec byqname(Str). Response:qname,name,lib,base,doc,abstract,slots.POST /api/loadLib— load library fromname(Str) andsource(Str). Response:loaded,specs.POST /api/unloadLib— unload library byname(Str). Response:unloaded.POST /api/exportLib— export library byname(Str) to Xeto source. Response:name,source.POST /api/validate— validate entity rows against the ontology. Response:entity,issueType,detail.
§Errors
- 400 Bad Request — missing required columns, spec not found, load/unload error, or request decode failure.
- 500 Internal Server Error — encoding error.
Functions§
- handle_
export_ lib - POST /api/exportLib — export a library to Xeto source text.
- handle_
load_ lib - POST /api/loadLib — load a library from Xeto source text.
- handle_
spec - POST /api/spec — get a single spec by qualified name.
- handle_
specs - POST /api/specs — list specs, optionally filtered by library.
- handle_
unload_ lib - POST /api/unloadLib — unload a library by name.
- handle_
validate - POST /api/validate — validate entities against the ontology.