API reference · 5 endpoints
Ontology
The entity and relationship type system for a namespace.
- GETGet namespace ontology
- PUTReplace namespace ontology
- POSTClassify unclassified entities
- POSTInfer a draft ontology
- GETGet ontology inference status
/v1/default/namespaces/{namespace_id}/ontologyGet namespace ontology
The namespace's entity classes and typed relations, plus its resolved ontology_mode. Empty lists when no ontology is defined.
Parameters
namespace_idstringpathrequired/v1/default/namespaces/{namespace_id}/ontologyReplace namespace ontology
Whole-document replace. Classes/relations carrying a known id (from a prior GET) update in place, others match case-insensitively by name, leftovers insert, and items absent from the payload are deleted (entities of a deleted class degrade to unclassified). Rejects duplicate class names and relations whose endpoints do not name a class in the payload.
Parameters
namespace_idstringpathrequiredRequest body · application/json
classesOntologyClassInput[]default []idstring (uuid) | nullnamestringrequireddescriptionstringdefault ""propertiesOntologyClassProperty[]default []namestringrequiredtype"string" | "integer" | "decimal" | "boolean" | "date" | "datetime"requireddescriptionstring | nulliconstring | nullcolorstring | nullrelationsOntologyRelationInput[]default []idstring (uuid) | nullnamestringrequiredfrom_classstringrequiredto_classstringrequiredcardinality"one-to-one" | "one-to-many" | "many-to-one" | "many-to-many"default "many-to-many"descriptionstringdefault ""/v1/default/namespaces/{namespace_id}/ontology/classifyClassify unclassified entities
Backfill ontology classes onto unclassified entities from the CURRENT ontology (batched LLM calls; only NULL class assignments are filled). Asynchronous when a workflow engine is wired (202), synchronous otherwise. 400 when the namespace has no ontology classes.
Parameters
namespace_idstringpathrequired/v1/default/namespaces/{namespace_id}/ontology/inferInfer a draft ontology
Propose a draft ontology (classes + typed relations) from the namespace's extracted entities and co-occurrence graph via one LLM call. Asynchronous when a workflow engine is wired (202 + operation_id; poll the status endpoint), synchronous otherwise. The draft is stored for review — never auto-applied.
Parameters
namespace_idstringpathrequired/v1/default/namespaces/{namespace_id}/ontology/infer/statusGet ontology inference status
Inference lifecycle (never/running/ready/failed) with the stored draft inline when ready.
Parameters
namespace_idstringpathrequired