Export Ontology
Download an uploaded ontology re-serialized in a chosen RDF syntax.
The stored file is parsed with rdflib and serialized again, so the output is normalized regardless of the syntax it was uploaded in.
Path Parameters
- ontology_key (str): The key of the ontology to export.
Query Parameters
- format (str):
turtle(text/turtle, default),xml(application/rdf+xml),json-ld(application/ld+json) ornt(application/n-triples).
Response
The serialized ontology as an attachment (Content-Disposition: attachment; filename="<ontology_key>.<ext>") with the matching Content-Type.
Error Codes
- 400 Bad Request: Unsupported format (the message lists the valid options)
- 404 Not Found: Ontology key not found for the authenticated user
- 422 Unprocessable Entity: Stored ontology file is not parseable RDF (JSON-LD
that references an external
@contextis refused), or the ontology cannot be written in the requested format (the message names a format to try instead) - 500 Internal Server Error: File system or serialization errors
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Key of the ontology to export, exactly as provided at upload time (see GET /api/v1/ontologies for available keys).
"medical_ontology"
Query Parameters
RDF serialization to return. One of: turtle, xml, json-ld, nt. Defaults to turtle.
"turtle"
Response
The ontology serialized in the requested RDF syntax.