IDigBio API v1 Examples: Difference between revisions

notes on curl
(notes on curl)
Line 4: Line 4:


=== Fetch A Single Record from the API ===
=== Fetch A Single Record from the API ===
In this example we use the curl command-line utility to fetch a single record from the API using the record's iDigBio uuid, then pipe the output to a JSON pretty printing program for human readability.


http://api.idigbio.org/v1/records/c93ebbee-64b5-4452-9e80-93bbfb11b815
http://api.idigbio.org/v1/records/c93ebbee-64b5-4452-9e80-93bbfb11b815


In this example we access a single record via its iDigBio uuid and pipe the output to a JSON pretty print program.
<pre>
<pre>
$ curl -s http://api.idigbio.org/v1/records/c93ebbee-64b5-4452-9e80-93bbfb11b815 | json_pp
$ curl -s http://api.idigbio.org/v1/records/c93ebbee-64b5-4452-9e80-93bbfb11b815 | json_pp
1,554

edits