Difference between revisions of "OJ Break API Reference"
Line 200: | Line 200: | ||
==== getAssociations ==== | ==== getAssociations ==== | ||
===== Description ===== | ===== Description ===== | ||
− | + | ||
===== Parameters ===== | ===== Parameters ===== | ||
* ''tnuid'': number | * ''tnuid'': number | ||
Line 206: | Line 206: | ||
* ''callback'': string | * ''callback'': string | ||
===== Return ===== | ===== Return ===== | ||
− | * | + | * |
===== Example ===== | ===== Example ===== | ||
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getAssociations?tnuid=30148&rank_grouping=Y&callback=api | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getAssociations?tnuid=30148&rank_grouping=Y&callback=api | ||
+ | |||
+ | ==== getHabitats ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getHabitats?tnuid=30148&callback=api | ||
+ | |||
+ | ==== getTaxonImages ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonImages?tnuid=30148&callback=api | ||
+ | |||
+ | ==== getTaxonBreakdown ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonBreakdown?tnuid=30148&callback=api | ||
+ | |||
+ | ==== getTaxonPhenology ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonPhenology?tnuid=30148&callback=api | ||
+ | |||
+ | ==== getTaxonNewTaxaByPub ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''validOnly'': string | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonNewTaxaByPub?tnuid=52&validOnly=Y&callback=api | ||
+ | |||
+ | ==== getTaxonNewTaxaByYear ==== | ||
+ | ===== Description ===== | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | * ''tnuid'': number | ||
+ | * ''validOnly'': string | ||
+ | * ''callback'': string | ||
+ | ===== Return ===== | ||
+ | * | ||
+ | ===== Example ===== | ||
+ | http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonNewTaxaByYear?tnuid=52&validOnly=Y&callback=api | ||
Line 215: | Line 283: | ||
! align="left"| Return | ! align="left"| Return | ||
! align="left"| Description | ! align="left"| Description | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|getTaxonNewTaxaByPub(tnuid:number, validOnly:<nowiki>Y|N</nowiki>, callback:string) | |getTaxonNewTaxaByPub(tnuid:number, validOnly:<nowiki>Y|N</nowiki>, callback:string) |
Revision as of 17:04, 23 May 2014
Introduction
OJ_Break is the name of the xBio:D RESTful(-like) API service to facilitate discovery of data within the xBio:D database. 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
- 1 Overview
- 2 Procedural Reference
- 2.1 Taxon
- 2.1.1 getTaxonStats
- 2.1.2 getTaxonInfo
- 2.1.3 getTaxonHierarchy
- 2.1.4 getIncludedTaxa
- 2.1.5 getTaxonSynonyms
- 2.1.6 getLocalities
- 2.1.7 getLocalities
- 2.1.8 getCuids
- 2.1.9 getCuids
- 2.1.10 getTypes
- 2.1.11 getInsts
- 2.1.12 getTaxonLiterature
- 2.1.13 getTaxonLit
- 2.1.14 getAssociations
- 2.1.15 getHabitats
- 2.1.16 getTaxonImages
- 2.1.17 getTaxonBreakdown
- 2.1.18 getTaxonPhenology
- 2.1.19 getTaxonNewTaxaByPub
- 2.1.20 getTaxonNewTaxaByYear
- 2.2 Occurrence / Specimen
- 2.3 Locality
- 2.4 Place / Geopolitical Entity
- 2.5 Literature
- 2.6 Journal
- 2.7 Institution
- 2.8 Unvouchered Record
- 2.9 Text Search
- 2.1 Taxon
- 3 Data Type Glossary
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",...
Procedural Reference
Taxon
getTaxonStats
Description
Get some basic taxonomic statistics for a taxon from a tnuid.
Parameters
- tnuid: number
- callback: string
Return
- taxon: string
- author: string
- stats: taxon_stats
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonStats?tnuid=30148&callback=api
getTaxonInfo
Description
Get some basic taxonomic information for a taxon from a tnuid.
Parameters
- tnuid: number
- inst_id: number
- callback: string
Return
- taxon_rel_extended class with below extensions
- valid_taxon: taxon_basic (only present when defined)
- parent_taxon: taxon_basic
- hier: taxon_hierarchy
- source: taxon_source
- common_names: array of common_name
- orig_desc: contrib_literature_basic (only present when defined)
- stats: taxon_info_stats
- contribs: array of contribution
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonInfo?tnuid=30148&inst_id=0&callback=api
getTaxonHierarchy
Description
Get the taxonomic hierarachy in which a taxon is at the terminal node from a tnuid.
Parameters
- tnuid: number
- callback: string
Return
- taxon: string
- author: string
- hier: taxon_hierarchy
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonHierarchy?tnuid=30148&callback=api
getIncludedTaxa
Description
Get the taxa that are directly included within a taxon but not synonymous with it.
Parameters
- tnuid: number
- inst_id: number
- showSyns: string
- showFossils: string
- types_only: string
- show_num_spms: boolean_flag
- callback: string
Return
- tnuid: number
- parent_tnuid: number
- includedTaxa: array of taxon_extended
Example
getTaxonSynonyms
Description
Get the taxa that are objective or subjectively synonymous with a taxon.
Parameters
- tnuid: number
- showFossils: string
- callback: string
Return
- synonyms: array of taxon_rel_extended
Example
getLocalities
Description
Get the localities from vouchered and unvouchered records for a taxon.
Parameters
- tnuid: number
- inst_id: number
- precDecimals: number
- showChildren: string
- callback: string
Return
- localities: array of loc_coords
Example
getLocalities
Description
Get the localities within geopolitical divisions from vouchered and unvouchered records for a taxon.
Parameters
- tnuid: number
- pnids: array of pnid
- inst_id: number
- precDecimals: number
- showChildren: string
- callback: string
Return
- localities: array of loc_coords
Example
getCuids
Description
Get the occurrence identifiers (collecting unit IDs) for a taxon.
Parameters
- tnuid: number
- showChildren: string
- inst_id: number
- pnids: array of pnid
- callback: string
Return
- cuids: array of cuid
Example
getCuids
Description
Get the occurrence identifiers (collecting unit IDs) for selected taxa.
Parameters
- tnuids: array of tnuid
- pnids: array of pnid
- callback: string
Return
- cuids: array of cuid
Example
getTypes
Description
Parameters
- tnuid: number
- showSyns: string
- inst_id: number
- primary_only: string
- taxon_author_search: string
- offset: number
- limit: number
- callback: string
Return
Example
getInsts
Description
Parameters
- tnuid: number
- callback: string
Return
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getInsts?tnuid=30148&callback=api
getTaxonLiterature
Description
Deprecated
Parameters
- tnuid: number
- showSyns: string
- callback: string
Return
Example
getTaxonLit
Description
Preferred
Parameters
- tnuid: number
- showSyns: string
- callback: string
Return
- pubs: array of pubs
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonLit?tnuid=30148&showSyns=Y&callback=api
getAssociations
Description
Parameters
- tnuid: number
- rank_grouping: string
- callback: string
Return
Example
getHabitats
Description
Parameters
- tnuid: number
- callback: string
Return
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getHabitats?tnuid=30148&callback=api
getTaxonImages
Description
Parameters
- tnuid: number
- callback: string
Return
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonImages?tnuid=30148&callback=api
getTaxonBreakdown
Description
Parameters
- tnuid: number
- callback: string
Return
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonBreakdown?tnuid=30148&callback=api
getTaxonPhenology
Description
Parameters
- tnuid: number
- callback: string
Return
Example
http://osuc.biosci.ohio-state.edu/hymDB/OJ_Break.getTaxonPhenology?tnuid=30148&callback=api
getTaxonNewTaxaByPub
Description
Parameters
- tnuid: number
- validOnly: string
- callback: string
Return
Example
getTaxonNewTaxaByYear
Description
Parameters
- tnuid: number
- validOnly: string
- callback: string
Return
Example
Method | Return | Description |
---|---|---|
getTaxonNewTaxaByPub(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonNewTaxaByYear(tnuid:number, validOnly:Y|N, callback:string) | ||
getTaxonStatsForYear(tnuid:number, stats_year:number, callback:string) |
Occurrence / Specimen
Method | Return | Description |
---|---|---|
getSpmInfo(cuid:string, callback:string) | ||
getSpmsInfo(cuids:array of string, callback:string) |
Locality
Method | Return | Description |
---|---|---|
getLocalityInfo(locID:number, tnuid:number, inst_id:number, per_id:number, pnid:number, showChildren:Y|N, completeSpmInfo:Y|N, callback:string) |
Place / Geopolitical Entity
Method | Return | Description |
---|---|---|
getPlaceInfo(place_id:number, callback:string) | ||
getSubdivisions(place_id:number, callback:string) | ||
getGeoTaxa(place_id:number, callback:string) | ||
getGeoCollTrips(place_id:number, callback:string) | ||
getGeoCollTrips2(place_id:number, callback:string) | ||
getGeoInsts(place_id:number, callback:string) |
Literature
Method | Return | Description |
---|---|---|
getLitReference(pub_id:number, callback:string) | ||
getLitParts(pub_id:number, callback:string) | ||
getPubTaxonCitation(pub_id:number, callback:string) | ||
getPubAssocCitation(pub_id:number, callback:string) |
Journal
Method | Return | Description |
---|---|---|
getJournalInfo(jrnl_id:number, callback:string) | ||
getJournalPubs(jrnl_id:number, callback:string) | ||
getJournalTaxa(jrnl_id:number, callback:string) |
Institution
Method | Return | Description |
---|---|---|
getCollectionInfo(inst_id:number, callback:string) | ||
getPrimaryTypes(inst_id:number, callback:string) | ||
getSecondaryTypes(inst_id:number, callback:string) | ||
getInstTaxa(inst_id:number, callback:string) | ||
getInstCollTrips2(inst_id:number, callback:string) | ||
getInstPubs(inst_id:number, callback:string) |
Unvouchered Record
Method | Return | Description |
---|---|---|
getUnvoucheredRecord(unv_id:number, callback:string) | ||
getUnvoucheredRecords(tnuid:number, showChildren:Y|N, pnids:array of number, callback:string) | ||
getUnvoucheredRecords(tnuids:array of number, pnids:array of number, callback:string) | ||
getUnvLocalityInfo(locID:number, tnuid:number, per_id:number, pnid:number, showChildren:Y|N, callback:string) |
Text Search
Method | Return | Description |
---|---|---|
getSearchResults(name:string, limit:number, categoryLimit:string, callback:string) | ||
getTaxaFromText(name:string, limit:number, nameOnly:Y|N, callback:string) | ||
getCuidsFromText(name:string, limit:number, callback:string) | ||
getAgentsFromText(name:string, limit:number, includeParty:Y|N, callback:string) | ||
getInstFromText(name:string, limit:number, callback:string) | ||
getJournalsFromText(name:string, limit:number, callback:string) | ||
getOrgsFromText(name:string, limit:number, callback:string) | ||
getPlacesFromText(name:string, limit:number, callback:string) | ||
getLocalitiesFromText(name:string, limit:number, callback:string) | ||
getCollMethodsFromText(name:string, limit:number, callback:string) |