1,554
edits
(in progress) |
|||
Line 19: | Line 19: | ||
Additional usage examples beyond those provided in this document, including more information on the "curl" command, are available in [[iDigBio API Examples]]. | Additional usage examples beyond those provided in this document, including more information on the "curl" command, are available in [[iDigBio API Examples]]. | ||
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. | |||
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" | |||
---- | ---- |
edits