Difference between revisions of "OJ Break API Reference"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
OJ_Break is the name of the OSUC biodiversity RESTful(-like) API service. The API responds exclusively in JavaScript Object Notation (JSON) and accepts only HTTP GET and POST requests indiscriminately unlike a true REST API. Built using Oracle's PL/SQL database language, the API is fast but often inflexible and inconsistent, so take note of all of the comments below. | OJ_Break is the name of the OSUC biodiversity RESTful(-like) API service. The API responds exclusively in JavaScript Object Notation (JSON) and accepts only HTTP GET and POST requests indiscriminately unlike a true REST API. Built using Oracle's PL/SQL database language, the API is fast but often inflexible and inconsistent, so take note of all of the comments below. | ||
+ | |||
== Reference == | == Reference == | ||
Line 10: | Line 11: | ||
* Example: '''''<nowiki>http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonInfo?tnuid=5012&callback=test</nowiki>''''' | * Example: '''''<nowiki>http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonInfo?tnuid=5012&callback=test</nowiki>''''' | ||
* Response: '''''test({"taxon":"Oxyscelio consobrinus","author":"(Kieffer)","status":"Subsequent name/combination","rank":"Species","valid":"Valid","fossil":"N","rel_type":"Member",...''''' | * Response: '''''test({"taxon":"Oxyscelio consobrinus","author":"(Kieffer)","status":"Subsequent name/combination","rank":"Species","valid":"Valid","fossil":"N","rel_type":"Member",...''''' | ||
+ | |||
=== Taxon === | === Taxon === | ||
Line 34: | Line 36: | ||
|- | |- | ||
|getTaxonSynonyms(tnuid:number, showFossils:<nowiki>Y|N</nowiki>, callback:string) | |getTaxonSynonyms(tnuid:number, showFossils:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getLocalities(tnuid:number, inst_id:number, precDecimals:number, showChildren:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getLocalities(tnuid:number, inst_id:number, pnids:array of number, precDecimals:number, showChildren:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getCuids(tnuids:array of number, pnids:array of number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getCuids(tnuid:number, showChildren:<nowiki>Y|N</nowiki>, inst_id:number, pnids:array of number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTypes(tnuid:number, showSyns:<nowiki>Y|N</nowiki>, inst_id:number, primary_only:<nowiki>Y|N</nowiki>, taxon_author_search:string, offset:number, limit:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getInsts(tnuid:number, callback:string) | ||
| | | | ||
| | | | ||
|- | |- | ||
|getTaxonLiterature(tnuid:number, showSyns:<nowiki>Y|N</nowiki>, callback:string) | |getTaxonLiterature(tnuid:number, showSyns:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getAssociations(tnuid:number, rank_grouping:string, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getHabitats(tnuid:number, callback:string) | ||
| | | | ||
| | | | ||
Line 66: | Line 100: | ||
|} | |} | ||
+ | |||
+ | === Taxon === | ||
+ | {| | ||
+ | ! align="left"| Method | ||
+ | ! align="left"| Return | ||
+ | ! align="left"| Description | ||
+ | |- | ||
+ | |getTaxonStats(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonInfo(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonHierarchy(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getIncludedTaxa(tnuid:number, showSyns:<nowiki>Y|N</nowiki>, showFossils:<nowiki>Y|N</nowiki>, inst_id:number, types_only:<nowiki>Y|N|P</nowiki>, show_num_spms:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonSynonyms(tnuid:number, showFossils:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonLiterature(tnuid:number, showSyns:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonImages(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonBreakdown(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonPhenology(tnuid:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonNewTaxaByPub(tnuid:number, validOnly:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonNewTaxaByYear(tnuid:number, validOnly:<nowiki>Y|N</nowiki>, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |- | ||
+ | |getTaxonStatsForYear(tnuid:number, stats_year:number, callback:string) | ||
+ | | | ||
+ | | | ||
+ | |} | ||
[[Category:OJ_Break API]] | [[Category:OJ_Break API]] |
Revision as of 20:36, 1 June 2012
Introduction
OJ_Break is the name of the OSUC biodiversity RESTful(-like) API service. The API responds exclusively in JavaScript Object Notation (JSON) and accepts only HTTP GET and POST requests indiscriminately unlike a true REST API. Built using Oracle's PL/SQL database language, the API is fast but often inflexible and inconsistent, so take note of all of the comments below.
Contents
Reference
Overview
All API requests must be formatted by first selecting the OJ_Break library then specifying the API method. Also, each method must include a callback argument even if a callback function is unnecessary (e.g. jQuery AJAX requests).
The format for API calls is: http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.[method]?[argument1]=[value1]&...
- Example: http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonInfo?tnuid=5012&callback=test
- Response: test({"taxon":"Oxyscelio consobrinus","author":"(Kieffer)","status":"Subsequent name/combination","rank":"Species","valid":"Valid","fossil":"N","rel_type":"Member",...
Taxon
Method | Return | Description |
---|---|---|
getTaxonStats(tnuid:number, callback:string) | ||
getTaxonInfo(tnuid:number, callback:string) | ||
getTaxonHierarchy(tnuid:number, callback:string) | ||
getIncludedTaxa(tnuid:number, showSyns:Y|N, showFossils:Y|N, inst_id:number, types_only:Y|N|P, show_num_spms:Y|N, callback:string) | ||
getTaxonSynonyms(tnuid:number, showFossils:Y|N, callback:string) | ||
getLocalities(tnuid:number, inst_id:number, precDecimals:number, showChildren:Y|N, callback:string) | ||
getLocalities(tnuid:number, inst_id:number, pnids:array of number, precDecimals:number, showChildren:Y|N, callback:string) | ||
getCuids(tnuids:array of number, pnids:array of number, callback:string) | ||
getCuids(tnuid:number, showChildren:Y|N, inst_id:number, pnids:array of number, callback:string) | ||
getTypes(tnuid:number, showSyns:Y|N, inst_id:number, primary_only:Y|N, taxon_author_search:string, offset:number, limit:number, callback:string) | ||
getInsts(tnuid:number, callback:string) | ||
getTaxonLiterature(tnuid:number, showSyns:Y|N, callback:string) | ||
getAssociations(tnuid:number, rank_grouping:string, callback:string) | ||
getHabitats(tnuid:number, callback:string) | ||
getTaxonImages(tnuid:number, callback:string) | ||
getTaxonBreakdown(tnuid:number, callback:string) | ||
getTaxonPhenology(tnuid:number, callback:string) | ||
getTaxonNewTaxaByPub(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonNewTaxaByYear(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonStatsForYear(tnuid:number, stats_year:number, callback:string) |
Taxon
Method | Return | Description |
---|---|---|
getTaxonStats(tnuid:number, callback:string) | ||
getTaxonInfo(tnuid:number, callback:string) | ||
getTaxonHierarchy(tnuid:number, callback:string) | ||
getIncludedTaxa(tnuid:number, showSyns:Y|N, showFossils:Y|N, inst_id:number, types_only:Y|N|P, show_num_spms:Y|N, callback:string) | ||
getTaxonSynonyms(tnuid:number, showFossils:Y|N, callback:string) | ||
getTaxonLiterature(tnuid:number, showSyns:Y|N, callback:string) | ||
getTaxonImages(tnuid:number, callback:string) | ||
getTaxonBreakdown(tnuid:number, callback:string) | ||
getTaxonPhenology(tnuid:number, callback:string) | ||
getTaxonNewTaxaByPub(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonNewTaxaByYear(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonStatsForYear(tnuid:number, stats_year:number, callback:string) |