How to use the DWB REST Webservice for Taxon Lists

From Diversitymobile Wiki
Revision as of 10:05, 4 September 2019 by Stefan (talk | contribs) (Analysis queries examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage Exapmles

The DTN Rest Webservice is meant to be used by Programms but from time to time it can also be useful to create requests manually. The main starting point for the service is the list as all taxon names belonging to a list.

Query all available lists

The result is a list with all available lists. For each item a link to the elements is given. If you follow this link all taxon name IDs are presented.

Query all taxon name IDs of a list

A list is defined by the database name (e.g "DiversityTaxonNames_Animalia") and the project number (aka list number):

This URL is a concatenation of the former URL with the database name and the project name. The result is an array of taxon name ids, gain with links to details for the taxon name.

Which analysis are available for this list?

For each name in a database additional values are stored in different analysis categories. An analysis might contain numeric values like the leaf length in mm, or category like the status of the taxon in a specific region, or just an information text. This is like an attribute which is given to the taxonomic name. Al analysis have IDs, in the example the analysis ID 2 is the status in Bavaria. As the analysis ID is only valid for a list in a specific database.

This query lists all analysis IDs which are used in the given list.

What is this analysis about?

To query information about the analysis ID 9 from the above database the API entry is now the analysiscategories.

Here one finds Information about the list and links to further details like the allowed analysis values.

Query an analysis value for a taxon name ID

This is the normal way to query analysis values. For each taxon name ID separately.

This will return the analysis value from analysis 6 for the taxon name id 4000202 in list 701.

Or to query the status in BAvaria for taxon name ID 200:

The result contains the analysis value "E" and links to the analysis and the analysis value definition.

What means the "E" in the above example?

Following the link analysiscategoryvalues form the result above will present a list for all defined values from the analysis containing also a description for each category.

The resulting json list has an entry for "E": {

 "AnalysisValue":	"E",
 "Description":	"eingebürgert"


Query a list to get all taxon name IDs from a list which have an entry for an analysis ID

It is possible to query a list for a specific analysis. For example to get all taxon names for a size class less or equal 2:

As a short cut one can get all taxon name IDs for all taxon names which have an analysis ID. For example query all taxon name IDs which have an assigns analysis category of 2 (Status in Bavaria):

The result is an list with all taxon name IDs which have an assigned analysis value for analysis category 2 including the information which analysis value is assigned .