IDigBio Download API: Difference between revisions

Jump to navigation Jump to search
update urls
(update urls)
Line 4: Line 4:


== Overview ==
== Overview ==
'''Note: While the download API is currently used by the production portal, it should be considered highly unstable for non-iDigBio consumers. The next revision of the API will most likely be a total rewrite, backend and front.
'''
'''Not all queries / query types are supported at this time.'''
'''The download API may not provide "friendly" error messages at this time.'''


The Download API works by performing the requested query and building a Darwin Core Archive. Once archive generation has begun, the status endpoint can be polled to determine if the generation has been completed. Once the archive generation is completed, the API provides a link to the file for download. If the optional email parameter is supplied on the query request, an email notification will be sent that includes a link to the downloadable file.
The Download API works by performing the requested query and building a Darwin Core Archive. Once archive generation has begun, the status endpoint can be polled to determine if the generation has been completed. Once the archive generation is completed, the API provides a link to the file for download. If the optional email parameter is supplied on the query request, an email notification will be sent that includes a link to the downloadable file.
Line 31: Line 24:


<pre>
<pre>
https://csv.idigbio.org/?query={Query in iDigBio query format}[&email={valid email address}]
https://api.idigbio.org/v2/download/?rq={Query in iDigBio query format}[&email={valid email address}]
</pre>
</pre>


Line 46: Line 39:


<pre>
<pre>
http://csv.idigbio.org/status/{status uuid}
http://api.idigbio.org/v2/download/{status uuid}
</pre>
</pre>


Line 62: Line 55:


<pre>
<pre>
https://csv.idigbio.org/?query=%7B%22genus%22%3A%22acer%22%7D&email=donotreply%40idigbio.org
https://api.idigbio.org/v2/download/?rq=%7B%22genus%22%3A%22acer%22%7D&email=donotreply%40idigbio.org
</pre>
</pre>


Line 70: Line 63:


<pre>
<pre>
$ curl "https://csv.idigbio.org/?query=%7B%22genus%22%3A%22acer%22%7D"
$ curl "https://api.idigbio.org/v2/download/?rq=%7B%22genus%22%3A%22acer%22%7D"
{
{
   "download_url" : "http://s.idigbio.org/idigbio-downloads/c5560080-23ce-42eb-a1d8-d663f31c77b8.zip",
   "download_url" : "http://s.idigbio.org/idigbio-downloads/c5560080-23ce-42eb-a1d8-d663f31c77b8.zip",
Line 89: Line 82:


<pre>
<pre>
$ curl -s "http://csv.idigbio.org/status/c5560080-23ce-42eb-a1d8-d663f31c77b8"
$ curl -s "http://api.idigbio.org/v2/download/c5560080-23ce-42eb-a1d8-d663f31c77b8"
{
{
   "status_url" : "http://csv.idigbio.org/status/c5560080-23ce-42eb-a1d8-d663f31c77b8",
   "status_url" : "http://csv.idigbio.org/status/c5560080-23ce-42eb-a1d8-d663f31c77b8",
Line 114: Line 107:


<pre>
<pre>
https://csv.idigbio.org/?query=%7B%22scientificname%22%3A%22puma+concolor%22%7D
https://api.idigbio.org/v2/download/?rq=%7B%22scientificname%22%3A%22puma+concolor%22%7D
</pre>
</pre>


150

edits

Navigation menu