OJ Break API Access

From xBio:D Wiki
Revision as of 15:49, 16 June 2014 by Tyler (talk | contribs) (Overview)
Jump to navigation Jump to search

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.


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 format and key argument.

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/OJ_Break/getTaxonHierarchy?tnuid=30148&format=json&key=FBF5D62445E57BDDE0430100007FC3A0

The response for an API call will include a success or error code, an associated response message, and the included data returned by the method call.

  • Response: {"code"100:,"message":"API resource successfully retrieved","data":{"taxon":"Heptascelio striatosternus","author":"Narendran & Ramesh Babu","hier":{"Kingdom":...