iobis / smalldata

1 stars 0 forks source link

Don't use OpenStreetMap names in location data #319

Closed kurt-o-sys closed 5 years ago

kurt-o-sys commented 5 years ago

We need to use another api @pieterprovoost ?

pieterprovoost commented 5 years ago

@kurt-o-sys @olecve We would like to use the Marine Regions API, but this does not support SSL for now. I have sent them a reminder, worst case scenario is that I set up a reverse proxy. This is an example call:

http://www.marineregions.org/rest/getGazetteerRecordsByName.json/bay%20of%20biscay/true/false

The response fields map to Darwin Core as follows:

When the Marine Regions API is used, locationAccordingTo can be populated with Marine Regions.

The full API docs are here: http://marineregions.org/gazetteer.php?p=webservices&type=rest

pieterprovoost commented 5 years ago

SSL will be implemented by end of October, so for now you can use this proxy: https://api.obis.org/marineregions/getGazetteerRecordsByName.json/bay%20of%20biscay/true/false

If possible make this configurable so we can easily update the URL.

olecve commented 5 years ago

@pieterprovoost there is CORS issue with the api. You need to enable CORS in a proxy configuration.

create:1 Access to fetch at 'https://api.obis.org/marineregions/getGazetteerRecordsByName.json/bay%20of%20biscay/true/false' from origin 'http://localhost:3030' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Please let me know when you enable it, so I can proceed with the task

pieterprovoost commented 5 years ago

@olecve Added CORS header, can you please try again?

olecve commented 5 years ago

@pieterprovoost thanks. It works now