Use ISO codes as country & language parameter value
13611
Reporter: mdoering
Assignee: mdoering
Type: Improvement
Summary: Use ISO codes as country & language parameter value
Description: we use the enum name now which is not intuitive and different from most places we have country or language parameters
Priority: Critical
Resolution: Fixed
Status: Closed
Created: 2013-08-20 12:27:19.799
Updated: 2014-12-02 17:31:50.678
Resolved: 2014-04-30 15:17:50.296
Author: trobertson@gbif.org
Created: 2013-09-12 13:25:28.519
Updated: 2013-09-12 13:25:28.519
This also applies to registry URLs. E.g. http://portaldev.gbif.org/dataset/search?publishingCountry=TAIWAN
Author: kbraak@gbif.org
Comment: Have we made a final decision, to use the isoCountryCode vs ENUM across all our API? If so, we have quite some work to do prior to releasing the final API.
Created: 2013-12-12 12:39:12.578
Updated: 2013-12-12 12:39:12.578
Author: mdoering@gbif.org
Comment: Probably not made that decision yet specifically to be done for version 1.0. But I would strongly vote to change that before we go live with 1.0. It will be backwards incompatible and bite us. Can we raise this at scrum please?
Created: 2013-12-12 15:35:20.225
Updated: 2013-12-12 15:35:20.225
Author: bko@gbif.org
Comment: Any decision made on this issue yet?
Created: 2014-01-14 10:41:38.386
Updated: 2014-01-14 10:41:38.386
Author: omeyn@gbif.org
Comment: Ongoing discussion has concluded that we should in all cases use the 2 letter iso code to mean "country" when using params. Occurrence and Maps APIs already do this, and the Species API doesn't use country explicitly. That only leaves the registry to refactor, which it definitely does need. See the linked issues for that path.
Created: 2014-02-25 15:40:42.679
Updated: 2014-02-25 15:40:42.679
Author: mdoering@gbif.org
Created: 2014-04-28 19:15:58.905
Updated: 2014-04-28 19:15:58.905
Modified cube metrics to use iso codes for country params:
http://api.gbif-dev.org/v0.9/occurrence/count?country=FR
Author: mdoering@gbif.org
Created: 2014-04-29 18:59:08.822
Updated: 2014-04-29 18:59:08.822
Modified registry-ws to use country iso codes for publishingCountry and do a common search request validation that is shared across all 3 solr search impls:
https://github.com/gbif/registry/commit/eb15866de582a716729b6aa82d3e7aa86ad57115
https://github.com/gbif/common-search/commit/949caa8dab6736b39be059889eb1e76d2b85aee1
Author: kbraak@gbif.org
Created: 2014-04-30 12:36:03.191
Updated: 2014-04-30 12:37:06.435
A quick review of where we stand then:
Dataset filtered by country parameter, still outstanding. E.g.
http://api.gbif-dev.org/v0.9/dataset?country=CA (404)
http://api.gbif-dev.org/v0.9/dataset?country=CANADA
Organization filtered by country parameter still outstanding. E.g.
http://api.gbif-dev.org/v0.9/organization?country=CA (404)
http://api.gbif-dev.org/v0.9/organization?country=CANADA
Node filtered by country done. E.g.
http://api.gbif-dev.org/v0.9/node/country/CO
Dataset Search (supports publishing_country, not country) done. E.g.
http://api.gbif-dev.org/v0.9/dataset/search?q=plant&publishing_country=CA
Dataset Suggest (supports publishing_country, not country) done. E.g.
http://api.gbif-dev.org/v0.9/dataset/suggest?q=Amazon&publishing_country=US
Also outstanding, is updating the API documentation.
Author: kbraak@gbif.org
Created: 2014-04-30 15:27:08.073
Updated: 2014-04-30 15:27:08.073
Great.
All the API docs need updating now..
Author: mdoering@gbif.org
Comment: forgot, but its done too: https://github.com/gbif/portal-web/commit/c7eaa593bf31cbc80ee27247966bb38123d33746
Created: 2014-04-30 15:57:01.673
Updated: 2014-04-30 15:57:01.673
Author: mdoering@gbif.org
Created: 2014-12-02 17:31:50.678
Updated: 2014-12-02 17:31:50.678
And finally the iso 3 character serde for languages:
https://github.com/gbif/gbif-api/commit/97b0825b4679616af25b1efa2a2f27a69c6a8ef8