Query ontology endpoint code.