National Network of Regional Coastal Monitoring Programmes

CCO API v1.1 Developer Information

Quick Start - Swagger test harness

Just try the API using this test page:

https://coastalmonitoring.org/swagger-ui-master/dist/

Use the development API key for the channelcoast.org domain: 6cefd36d8e12a4dead4cf06d4dbd09c0

API Key and Referer header

The API key must be provided with every API request, either as an HTTP GET variable, key=XXXX, or in the custom request header X-API-Key: XXXX.

Note that the Referer header must specify the domain of application the key is issued for, e.g. Referer: http://www.yourdomain.com.

API endpoints

Most recent wave buoy, tide or met observations, or tide predictions (one data entry per locaton):

https://coastalmonitoring.org/observations/waves/latest?key=XXXX
https://coastalmonitoring.org/observations/tides/latest?key=XXXX
https://coastalmonitoring.org/observations/tidepredictions/latest?key=XXXX
https://coastalmonitoring.org/observations/met/latest?key=XXXX

Observations or tide predictions at or close to a certain date/time (example for 2021-01-23 13:00:00):

https://coastalmonitoring.org/observations/waves/20210123130000?key=XXXX
https://coastalmonitoring.org/observations/tides/20210123130000?key=XXXX
https://coastalmonitoring.org/observations/tidepredictions/20210123130000?key=XXXX
https://coastalmonitoring.org/observations/met/20210123130000?key=XXXX

Observations or tide predictions at a single location, using either site name or id (see full output to identify site names and identifiers):

https://coastalmonitoring.org/observations/waves/latest.geojson?key=XXXX&sensor=Dawlish
https://coastalmonitoring.org/observations/tides/20210123130000?key=XXXX&sensor=89
https://coastalmonitoring.org/observations/tidepredictions/20210123130000?key=XXXX&sensor=89
https://coastalmonitoring.org/observations/met/latest.kml?key=XXXX&sensor=Deal%20Pier

Multiple observations or tide predictions for each sensor within a single request, specified in hours. Each call may request up to 168 (one week) for all sensors, or 8,760 (one year) for a single sensor:

https://coastalmonitoring.org/observations/waves/latest.geojson?key=XXXX&sensor=Dawlish&duration=24
https://coastalmonitoring.org/observations/tides/20210123130000?key=XXXX&duration=1
https://coastalmonitoring.org/observations/tidepredictions/20210123130000?key=XXXX&duration=1

Use content negotiation to switch between output types (GML, KML, GeoJSON):

Accept header: either application/xml or application/vnd.google-earth.kml+xml or application/json

If the key/username/domain combination is not correct then the user receives an error message. The response depends on the content negotiation performed using the Accept header and is either a valid WFS document (which is actually XML with coordinates), a Google Earth KML document (also XML), or a GeoJSON document (JSON with coordinates).

Alternatively append the format parameter to the URL to override content negotiation:

https://coastalmonitoring.org/observations/waves/latest.gml?key=XXXX
https://coastalmonitoring.org/observations/waves/latest.kml?key=XXXX
https://coastalmonitoring.org/observations/waves/latest.geojson?key=XXXX
https://coastalmonitoring.org/observations/tides/20210123130000.geojson?key=XXXX
(same for tidepredictions and met)

Obtaining an API key for your own service

This will be automated via a web interface on the CCO user management page. In the meantime, please fill in the form below:

Not registered?
e.g. www.mygraphapp.org
  Fields in red are required!

Please note that your Web browser or other application that is accessing the API must provide Referer header with the domain of application the key is issued for.

Questions/Comments welcome, just drop us an email or use our contact form.

Attribution

Please include the following attribution on web pages or other outputs which include data from the CCO real time API:

"Real time data displayed on this page are from the Regional Coastal Monitoring Programme, made freely available under the terms of the Open Government Licence. Please note that these are real-time data and are not quality-controlled."