1,554
edits
(change GUID to UUID in most places →Three ways to fetch a specific record based on iDigBio GUID) |
(replace GUID with UUID in most places) |
||
Line 801: | Line 801: | ||
We will use the "media" endpoint for that mediarecord's iDigBio | We will use the "media" endpoint for that mediarecord's iDigBio UUID and add the "quality" parameter with "thumbnail" as the value: | ||
http://api.idigbio.org/v1/mediarecords/00002091-4fb3-410a-9307-bd3e917dfcca/media?quality=thumbnail | http://api.idigbio.org/v1/mediarecords/00002091-4fb3-410a-9307-bd3e917dfcca/media?quality=thumbnail | ||
Line 809: | Line 809: | ||
[[File:Screenshot_thumbnail_00002091-4fb3-410a-9307-bd3e917dfcca.png]] | [[File:Screenshot_thumbnail_00002091-4fb3-410a-9307-bd3e917dfcca.png]] | ||
''Note that the final image URL should not be considered stable or permanent. Images can be moved around to various storage platforms. The Mediarecord has a | ''Note that the final image URL should not be considered stable or permanent. Images can be moved around to various storage platforms. The Mediarecord has a UUID that will remain contstant but the containing data, including the image location, may be updated over time.'' | ||
=== Curculionidae Image Example === | === Curculionidae Image Example === | ||
Let us say we have already located the specimen record for a particular Curculionidae specimen (a family of weevils). The speciment record for our particular example is identified by the following iDigBio | Let us say we have already located the specimen record for a particular Curculionidae specimen (a family of weevils). The speciment record for our particular example is identified by the following iDigBio UUID: | ||
<code> | <code> | ||
Line 819: | Line 819: | ||
</code> | </code> | ||
To retrieve a specimen record from v1 of the API with the above iDigBio | To retrieve a specimen record from v1 of the API with the above iDigBio UUID, we issue a GET HTTP request to the following endpoint: | ||
<code> | <code> | ||
Line 918: | Line 918: | ||
</pre> | </pre> | ||
In addition, it is possible to request more or fewer records at a time using the "from" and "size" parameters. Below is the full curl example requesting only the first 3 records and grep'ing out only the iDigBio | In addition, it is possible to request more or fewer records at a time using the "from" and "size" parameters. Below is the full curl example requesting only the first 3 records and grep'ing out only the iDigBio UUID field. Note that we put the URL in quotes to keep the shell from trying to interpret it. | ||
<pre> | <pre> |
edits