IDigBio API v1 Examples: Difference between revisions

convert to sections so they show up in ToC
(convert to sections so they show up in ToC →‎Viewing JSON Output)
(convert to sections so they show up in ToC)
Line 87: Line 87:
The following three examples intend to illustrate the various methods for looking up a unique record in iDigBio and also to provide a brief introduction to the URL syntax of the APIs.
The following three examples intend to illustrate the various methods for looking up a unique record in iDigBio and also to provide a brief introduction to the URL syntax of the APIs.


; 1. 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.
Line 155: Line 155:
</pre>
</pre>


; 2. Use the Elasticsearch URL interface with query parameter
==== Use the Elasticsearch URL interface with query parameter ====


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.
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.
Line 305: Line 305:
</pre>
</pre>


; 3. Use the Elasticsearch URL interface with json-formatted filter query in the message body
==== Use the Elasticsearch URL interface with json-formatted filter query in the message body ====


A JSON query document can be specified on the command-line. Searching for the iDigBio GUID in the "uuid" term would look like the following:
A JSON query document can be specified on the command-line. Searching for the iDigBio GUID in the "uuid" term would look like the following:
1,554

edits