Difference between revisions of "App/API/Ontology/glossary markup"

From mx Help Wiki
Jump to: navigation, search
m
m (Example)
 
(One intermediate revision by one user not shown)
Line 4: Line 4:
  
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''glossary_markup'''/<text>
 
<nowiki>http:</nowiki>//''base_url''/api/ontology/'''glossary_markup'''/<text>
 +
 +
''This is an alternate method to 'uri_markup' (which is the preferred markup method)''.  Returns the provided text and a hyperlinked version that resolved to the ontology API ('''ontology_class''' action) documented here.
  
 
== Response (JSON) ==
 
== Response (JSON) ==
Line 20: Line 22:
 
   {
 
   {
 
   "text":"Head longer than metasoma",
 
   "text":"Head longer than metasoma",
   "markup":"\u003Ca href=\"<nowiki>http://purl.obolibrary.org/obo/HAO_0000397</nowiki>\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"<nowiki>http</nowiki>://purl.obolibrary.org/obo/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
+
   "markup":"\u003Ca href=\"<nowiki>h<nowiki>ttp://api.hymao.org/ontology/ontology_class/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"http://api.hymao.org/ontology/ontology_class/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
 
   }
 
   }

Latest revision as of 23:36, 4 March 2011

Back to ontology API home

[edit] Description

http://base_url/api/ontology/glossary_markup/<text>

This is an alternate method to 'uri_markup' (which is the preferred markup method). Returns the provided text and a hyperlinked version that resolved to the ontology API (ontology_class action) documented here.

[edit] Response (JSON)

 text: text
 markup: html

[edit] Example

Request:

http://api.hymao.org/api/ontology/glossary_markup/Head%20longer%20than%20metasoma

Response:

 {
  "text":"Head longer than metasoma",
  "markup":"\u003Ca href=\"h<nowiki>ttp://api.hymao.org/ontology/ontology_class/HAO_0000397\"\u003Ehead\u003C/a\u003E longer than \u003Ca href=\"http://api.hymao.org/ontology/ontology_class/HAO_0000626\"\u003Emetasoma\u003C/a\u003E"
  }
Personal tools