IDigBio API v1 Specification: Difference between revisions

Jump to navigation Jump to search
minor tweaks →‎Endpoints
(add publishers uuid recordsets)
(minor tweaks →‎Endpoints)
Line 26: Line 26:
Most of the provided usage examples include a JSON formatter (such as json_pp) to make the JSON document response easier for humans to read. Additional usage examples as well as information on JSON formatting and the "curl" command, are available in [[iDigBio API Examples]].
Most of the provided usage examples include a JSON formatter (such as json_pp) to make the JSON document response easier for humans to read. Additional usage examples as well as information on JSON formatting and the "curl" command, are available in [[iDigBio API Examples]].


There are two major types of API enpoints:  
There are three major types of API endpoints:  


*Collection - which is a group endpoint that returns lists of multiple records. These urls are of the form <base url>/<version>/<type>, such as http://api.idigbio.org/v1/mediarecords/ . Additionally, a collection endpoint can contain optional query parameters, [[?limit]] indicates the number of records returned in the collection and defaults to 1000 and the [[?offset]] parameter which indicates the number of records to skip before returning a set of records and defaults to 0. If a collection endpoint request finds more then the set limit of records it will include a "next page" link to retrieve the next set of records in the collection. See the [[#endpointprops|endpoint properties]] section for more information on properties returned.
*List - The endpoint returns a JSON document containing a list of iDigBio UUIDs and links to other records. The List of UUIDs normally does not contain content data. To get to record content data, links to each item in the List are followed.
   
   
*Entity - A single item endpoint which returns all of the data available about an object. These urls are of the form  <base url>/<version>/<type>/<id> like the example used above.
*Full Record - The endpoint returns a JSON document representing a Full Record for a type of object.  Examples include a Specimen Record or a Media Record. The Full Record endpoint is used to retrieve all of the data about a particular object.
 
*Media - A media endpoint returns one or more HTTP redirects to an actual media file (typically a JPEG image).
 


Examples:
Examples:
Line 48: Line 51:


;Description
;Description
:Returns a list of top-level API versions or service URLs.
:Returns a List of top-level API versions or service URLs.


;Resource URL
;Resource URL
Line 75: Line 78:


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


;Resource URL
;Resource URL
Line 845: Line 848:


;Description
;Description
:Returns a list of recordset iDigBio UUIDs. A recordset is a group of published data.
:Returns a List of recordset iDigBio UUIDs. A recordset is a group of published data.


;Resource URL
;Resource URL
Line 930: Line 933:


;Description
;Description
:Returns the full record of a recordset with the specified iDigBio UUID.
:Returns the full Recordset record with the specified iDigBio UUID.


;Resource URL
;Resource URL
Line 1,009: Line 1,012:


;Description
;Description
:Returns a list of Media Record iDigBio UUIDs that belong to the recordset of the specified iDigBio UUID.
:Returns a List of Media Record iDigBio UUIDs that belong to the recordset of the specified iDigBio UUID.


;Resource URL
;Resource URL
1,554

edits

Navigation menu