Difference between revisions of "App/API/Ontology/ontology class"

From mx Help Wiki
Jump to: navigation, search
m
m (Example)
Line 31: Line 31:
 
Response:
 
Response:
  
{"HAO:0000397":
+
{"HAO:0000397":
{"label":"head",
+
  {"label":"head",
  "relationships":[{"predicate":"is_a","subject":{"label":"head","id":"HAO:0000397"},"object":{"label":"tagma","id":"HAO:0000988"}},{"predicate":"part_of","subject":{"label":"head","id":"HAO:0000397"},"object":{"label":"body","id":"HAO:0000182"}}],
+
    "relationships":
  "definition":"The tagma that is located anterior to the thorax."}}
+
      [
 +
        {"predicate":"is_a","subject":{"label":"head","id":"HAO:0000397"},"object":{"label":"tagma","id":"HAO:0000988"}},
 +
        {"predicate":"part_of","subject": {"label":"head","id":"HAO:0000397"},"object":{"label":"body","id":"HAO:0000182"}}
 +
      ],
 +
  "definition":"The tagma that is located anterior to the thorax."}
 +
}

Revision as of 16:05, 10 February 2011

http://base_url/api/ontology/ontology_class/<CLASS_ID>

Description

Response (JSON)

CLASS_ID:
 definition: definition
 label: name
 relationships: 
   [
    {  subject: 
         id: CLASS_ID1
         label: name
       predicate: relationship_type 
       object: 
         id: CLASS_ID2
         label: name
    }
    ... 
   ]
   


Example

Request:

http://api.hymao.org/api/ontology/ontology_class/HAO_0000397

Response:

{"HAO:0000397":
  {"label":"head",
   "relationships":
      [
        {"predicate":"is_a","subject":{"label":"head","id":"HAO:0000397"},"object":{"label":"tagma","id":"HAO:0000988"}},
        {"predicate":"part_of","subject": {"label":"head","id":"HAO:0000397"},"object":{"label":"body","id":"HAO:0000182"}}
      ],
  "definition":"The tagma that is located anterior to the thorax."}
}
Personal tools