Ontology API reference
NAMS-backend only. All methods raise NotSupportedError on bolt.
Methods
| Python | TypeScript | Semantics |
|---|---|---|
|
|
System templates + workspace-owned ontologies; the active one is flagged ( |
|
|
One ontology with its full revision history ( |
|
|
Active version’s parsed document + composed |
|
|
Editable workspace copy of a system template; returns the rev-1 version. |
|
|
New workspace ontology from a schema document; returns the rev-1 version. |
|
|
New immutable revision (n+1); returns it. |
|
|
Bind a version; subsequent entity writes validate against it. |
|
|
Delete a workspace-owned ontology. |
Return types
list() returns OntologySummary[]. get() returns Ontology ({record,
versions[]}). get_active() returns ActiveOntology. clone / create /
update / activate return an OntologyVersion.
Ontology document schema
| Field | Shape | Notes |
|---|---|---|
|
|
Identity + display metadata. |
|
|
|
|
|
|
|
|
|
The OntologyVersion carries id, ontology_id, revision,
validation_mode (permissive | strict), the parsed document,
schema_hash, created_at, and message.
REST endpoints
The SDK targets these workspace-scoped endpoints (under the versioned base, e.g.
/v1). They are not in the published OpenAPI spec; the shapes are verified
against the staging deployment. Request bodies use snake_case.
| Method | Path | Maps to |
|---|---|---|
GET |
|
|
GET |
|
|
GET |
|
|
POST |
|
|
POST |
|
|
PUT |
|
|
POST |
|
|
DELETE |
|
|
POST |
|
— (REST only, no SDK method) |
GET |
|
— (REST only, no SDK method) |
POST |
|
— (REST only, no SDK method) |
|
|
Errors
| Condition | Exception |
|---|---|
Strict-mode validation rejection |
|
Ontology method on the bolt backend |
|
No active ontology bound |
|
System templates
~28 system templates ship on the service (each is_system = true, revision 1).
nams-default is bound until a workspace activates its own:
agent-memory, conservation, cybersecurity, data-journalism,
digital-twin, education, financial-services, gaming, genai-llm-ops,
gis-cartography, golf-sports, government, healthcare, hospitality,
legal, manufacturing, nams-default, oil-gas, options-intelligence,
personal-knowledge, product-management, real-estate, retail-ecommerce,
scientific-research, software-engineering, trip-planning,
vacation-industry, wildlife-management.