1,554
edits
Line 85: | Line 85: | ||
=== Three ways to fetch a specific record based on iDigBio GUID === | === Three ways to fetch a specific record based on iDigBio GUID === | ||
The following three examples intend to illustrate the various methods for looking up a unique record in iDigBio. | The following three examples intend to illustrate the various methods for looking up a unique record in iDigBio and how the output may differ for the same record. | ||
The data returned by the Elasticsearch interface may differ from the raw API record, especially with regards to field names, since the Elasticsearch data has been normalized and indexed for consumption by the search portal. | |||
For these three examples, consider the iDigBio specimen record identified by the following GUID: | |||
<pre> | |||
"idigbio:uuid" : "0cec43d8-9ad5-478a-bea1-397ab5cc4430" | |||
</pre> | |||
==== Use the API ==== | ==== Use the API ==== | ||
The complete record that was provided to iDigBio is stored in the API and can be retrieved by referencing the iDigBio GUID ("idigbio:uuid") as the entity ID at the '/records/{ID}' endpoint. | The complete record that was provided to iDigBio is stored in the API and can be retrieved by referencing the iDigBio GUID ("idigbio:uuid") as the entity ID at the '/records/{ID}' endpoint. | ||
The following command sends the query as an HTTP <code> GET </code> request: | |||
<pre> | <pre> | ||
Line 157: | Line 167: | ||
==== Use the Elasticsearch URI Search ==== | ==== Use the Elasticsearch URI Search ==== | ||
The | The normalized and indexed record that is stored in Elasticsearch can be retrieved by referencing the iDigBio GUID ("uuid") as the term provided to the query string parameter. | ||
The list of available terms in the iDigBio index is available at [[IDigBio_API#Elasticsearch_-_Records]]. | The list of available terms in the iDigBio index is available at [[IDigBio_API#Elasticsearch_-_Records]]. |
edits