Talk:IDigBio API: Difference between revisions

Line 35: Line 35:
  "http://api.idigbio.org/v1/records/00000230-01bc-4a4f-8389-204f39da9530"  
  "http://api.idigbio.org/v1/records/00000230-01bc-4a4f-8389-204f39da9530"  
</pre>
</pre>
There are two major types of API enpoints:
*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.
*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.
NOTE: at this time the API does not support search capabilities on entities or collections.
Examples:
collection:
"http://api.idigbio.org/v1/mediarecords"
collection w/ optional query parameters:
"http://api.idigbio.org/v1/mediarecords?limit=100&offset=100"
entity:
"http://api.idigbio.org/v1/mediarecords/00000230-01bc-4a4f-8389-204f39da9530"


== Endpoint Basics ==
== Endpoint Basics ==
1,554

edits