Closed kurt-o-sys closed 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:
latitude
> decimalLatitude
longitude
> decimalLongitude
precision
> coordinateUncertaintyInMeters
preferredGazetteerName
> locality
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
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.
@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
@olecve Added CORS header, can you please try again?
@pieterprovoost thanks. It works now
We need to use another api @pieterprovoost ?