Upload Ontology
Upload a single ontology file for later use in cognify operations.
Request Parameters
- ontology_key (str): Unique, user-defined identifier for the ontology (plain string — values starting with ’[’ or ’{’ are rejected; duplicate keys return 400). Use this key later as the
ontology_keyparameter in /api/v1/cognify or /api/v1/remember. - ontology_file (UploadFile): Single ontology file in OWL (RDF/XML) format; the filename must end with .owl.
- description (Optional[str]): Optional description for the ontology (plain string; values starting with ’[’ or ’{’ are rejected).
Response
Returns metadata about the uploaded ontology including key, filename, size, and upload timestamp.
Error Codes
- 400 Bad Request: Invalid file format, duplicate key, multiple files uploaded
- 500 Internal Server Error: File system or processing errors
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique, user-defined identifier for this ontology. Reference it later via the ontology_key parameter of the cognify/remember endpoints.
"medical_ontology"
Single ontology file in OWL (RDF/XML) format. The filename must end with .owl — other extensions are rejected with 400. Exactly one file per request.
Optional human-readable description (plain string; values starting with '[' or '{' are rejected).
"OWL ontology of medical conditions and treatments"
Response
Successful Response
The response is of type Response Upload Ontology Api V1 Ontologies Post · object.