Issue 12566

registry-ws: add isoCountrycode filter

12566
Reporter: kbraak
Assignee: mdoering
Type: Improvement
Summary: registry-ws: add isoCountrycode filter
Priority: Major
Resolution: WontFix
Status: Resolved
Created: 2012-12-20 19:46:18.468
Updated: 2014-04-29 14:52:05.364
Resolved: 2014-04-29 14:52:05.332
        
Description: Add isoCountryCode filter to the following web service endpoint URLs:

/organization
/network
/installation

For example: /organization?isoCountryCode=DK will filter all organizations that have been endorsed by (belong to) "Denmark"

Please refer to API documentation http://dev.gbif.org/wiki/display/POR/Webservice+API and update the related services when work is complete.]]>
    


Author: kbraak@gbif.org
Comment: Dataset Search Service uses "country". This is a potential inconsistency in parameter names.
Created: 2013-01-02 14:18:37.748
Updated: 2013-01-02 14:18:37.748


Author: bko@gbif.org
Created: 2013-03-26 14:46:48.074
Updated: 2013-03-26 15:20:34.509
        
I think semantically country is different from isoCountryCode, but practically isoCountryCode would be the actual attribute that is used. Unless we want to explain what is the difference of using country as the facet and using isoCountryCode.

There had been a discussion about whether the isoCountryCode should apply to /node. After consulting Senior Programmer Officer for Participation, since GBIF signs MoU with a Node that represents a country, legally there could only be one Node per country. Therefore isoCountryCode is not needed as a filter for /node.
    


Author: kbraak@gbif.org
Created: 2013-12-11 17:17:09.714
Updated: 2013-12-11 17:17:09.714
        
In the next half year, we will be finalizing our API. We need to come to a decision on this.

As per http://www.gbif.org/developer/registry we use country ENUM parameter. Only on /node/country/{ISO-CODE} do we use the ISO 639-1 (2 letter) or ISO 639-2 (3 letter) country code.

[~bko@gbif.org] mentions above, that in talking with [~olafbanki], using country would be fine. Therefore, we could attempt to use country instead of ISO code, on all cases. [~mdoering@gbif.org] feel free to comment. Thanks.
    


Author: trobertson@gbif.org
Created: 2014-04-29 14:41:00.157
Updated: 2014-04-29 14:41:00.157
        
Note: Organizations endorsed by Denmark is available

Denmark: http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b
Organizations endorsed by Denmark: http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/organization
    


Author: trobertson@gbif.org
Created: 2014-04-29 14:41:52.834
Updated: 2014-04-29 14:41:52.834
        
And datasets endorsed by Denmark
http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/dataset

    


Author: trobertson@gbif.org
Created: 2014-04-29 14:43:02.002
Updated: 2014-04-29 14:43:02.002
        
Installations of organizations endorsed by Denmark:
http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/installation
    


Author: mdoering@gbif.org
Created: 2014-04-29 14:52:00.087
Updated: 2014-04-29 14:52:00.087
        
Filtering by organizations, datasets and installations by the endosring country can be done using the following calls once you have the node UUID for a given country:

http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/organization
http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/dataset
http://api.gbif.org/v0.9/node/4ddd294f-02b7-4359-ac33-0806a9ca9c6b/installation

This does most of the desired job. If any further methods are needed please open up a new issue with a reasoning why its needed in addition to these calls here.