Difference between revisions of "IDigBio API v0 Specification"

From iDigBio
Jump to: navigation, search
(add bold note)
 
(3 intermediate revisions by one user not shown)
Line 3: Line 3:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
  
'''This document has been superceded by [[IDigBio API v1 Specification]]. Please use the current version of the API if possible. '''
+
{{Caution|The iDigBio version 0 APIhas been superseded and is no longer available. For information on curent APIs, please see the [[iDigBio API]] page. This page remains for historical reference.}}
  
Previous versions of the API (such as v0) may be less-fully documented than current versions.
 
  
 
== Available Types==
 
== Available Types==
Line 70: Line 69:
 
| returns a recordset with specific entity ID
 
| returns a recordset with specific entity ID
 
|}
 
|}
 +
 +
=== GET /{api_version} ===
 +
 +
Description: Returns a list of top-level API feature types for a particular version of the API
 +
 +
Resource URL:
 +
<pre>
 +
http://api.idigbio.org/v1
 +
</pre>
 +
 +
Parameters: None
 +
 +
Sample Usage:
 +
 +
<pre>
 +
$ curl -s http://api.idigbio.org/v0 | json_pp
 +
{
 +
  "records" : "http://api.idigbio.org/v0/records",
 +
  "recordsets" : "http://api.idigbio.org/v0/recordsets",
 +
  "mediaaps" : "http://api.idigbio.org/v0/mediaaps",
 +
  "mediarecords" : "http://api.idigbio.org/v0/mediarecords"
 +
}
 +
 +
</pre>

Latest revision as of 18:07, 9 July 2018


Caution! Caution: The iDigBio version 0 APIhas been superseded and is no longer available. For information on curent APIs, please see the iDigBio API page. This page remains for historical reference.


Available Types

$ curl -s "http://api.idigbio.org/v0/" | json_pp
{
   "records" : "http://api.idigbio.org/v0/records",
   "recordsets" : "http://api.idigbio.org/v0/recordsets",
   "mediaaps" : "http://api.idigbio.org/v0/mediaaps",
   "mediarecords" : "http://api.idigbio.org/v0/mediarecords"
}

Available endpoints

All endpoints follow the form of "http://api.idigbio.org/{api_version}{endpoint}"

iDigBio v0 API Endpoints
Endpoint Method Description
'/mediarecords' GET returns a collection of media record IDs
'/mediarecords/{ID}' GET returns a media record with the specific entity ID
'/mediarecords/{ID}/media' GET returns an image associated with the specific entity ID
'/records' GET returns a collection of record IDs
'/records/{ID}' GET returns a record with the specific entity ID
'/records/{ID}/media' GET returns an image associated with the specific entity ID
'/publishers' GET returns a collection of publisher IDs
'/publishers/{ID}' GET returns a publisher with specific entity ID
'/recordsets' GET returns a collection of recordset IDs
'/recordsets/{ID}' GET returns a recordset with specific entity ID

GET /{api_version}

Description: Returns a list of top-level API feature types for a particular version of the API

Resource URL:

http://api.idigbio.org/v1

Parameters: None

Sample Usage:

$ curl -s http://api.idigbio.org/v0 | json_pp
{
   "records" : "http://api.idigbio.org/v0/records",
   "recordsets" : "http://api.idigbio.org/v0/recordsets",
   "mediaaps" : "http://api.idigbio.org/v0/mediaaps",
   "mediarecords" : "http://api.idigbio.org/v0/mediarecords"
}