Click here for Swagger - Interactive API explorer
To execute calls the service input your api-key by clicking the "Authorize" button in Swagger
Example: https://dmigw.govcloud.dk/v2/oceanObs/collections/observation/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) observations
Example: https://dmigw.govcloud.dk/v2/oceanObs/collections/station/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) stations
The collection endpoints support a number of query parameters to filter or sort data. Make sure to read the query primer to make use of the below query parameters.
{
"type": "FeatureCollection",
"features": [
{
"geometry": {
"coordinates": [
9.9625,
57.5951
],
"type": "Point"
},
"id": "02109a3a-769e-c02f-cc3d-6e0251ac9e96",
"type": "Feature",
"properties": {
"created": "2023-10-26T09:20:35.754319Z",
"observed": "2023-10-26T09:20:00Z",
"parameterId": "sealev_ln",
"qcStatus": "auto",
"stationId": "20047",
"value": -30.0
}
}
],
"timeStamp": "2023-10-26T09:24:45Z",
"numberReturned": 1,
"links": [
{
"href": "https://dmigw.govcloud.dk/v2/oceanObs/collections/observation/items?limit=1&sortorder=observed,DESC",
"rel": "self",
"type": "application/geo+json",
"title": "This document"
},
{
"href": "https://dmigw.govcloud.dk/v2/oceanObs/collections/observation/items?limit=1&sortorder=observed,DESC&offset=1",
"rel": "next",
"type": "application/geo+json",
"title": "Next set of results"
}
]
}
Example: https://dmigw.govcloud.dk/v2/oceanObs/collections
Description: Will return all available collections in the API. Available collections:
limit |
Specify a maximum number of objects (e.g. observations) you want to be returned. If a limit is not specified, the default limit is 1000. If more than 300000 objects are needed then use either the offset to request the next set of observations or download the data. Please be advised that this is a "maximum" and the result size could be less than what is requested Max possible limit: 300000 is the maximum limit you can request Example: Returns a maximum of 100 objects |
offset |
Specify the number of objects that should be skipped before returning matching objects. Default: 0. Max possible offset: 1.000.000 Using the limit and the offset parameters, a client can page through the objects returned - page size is set by the limit parameter. This will only work up to the maximum possible offset. If datasets larger than maximum limit plus maximum offset are required then data should be retrieved using the download service or by splitting requests by the datetime parameter. Example: Returns a maximum of 100 objects skipping the first 1000 |
stationId |
Narrow the search to a specific station ID. Overview of stations can be found here Example: Returns observations for the station with the id "30017" |
datetime |
Narrow the search to a date range where both ends of the range are inclusive or a specific date. The range can be open on one side. If that is the case simply use ".." (double-dot) in stead of the an actual date for the open side. If only one date is supplied, then only exactly matching dates will be included. If both sides of the range are open, simply omit the datetime parameter. The plus sign "+" must be URL encoded: Danish summer time is UTC+2 (GMT+2) You can read more about how to deal with the status and the datetime parameter in the context of station here. Examples: Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight. Both dates are inclusive.
Returns observations within the dates 2019-01-01 at midnight and 2020-01-01 at midnight in Danish summer timezone. Both dates are inclusive.
Returns observations from the date 2019-01-01 at midnight (Danish summer timezone) and after
Returns observations before or matching the date 2019-01-01 at midnight (Danish summer timezone).
Returns observations matching the date 2019-01-01 at midnight (Danish summer timezone)
Returns stations having the status "Active" at some time in the month of November 2020 (but not necessarily the whole month). |
bbox |
Narrow the search to only include objects within the specified bounding box. A bounding box (usually shortened to bbox) is an area defined by two longitudes and two latitudes, where:
They follow the standard format of: bbox = Southwesterly point (lon,lat) followed by northeasterly point (lon, lat) This bbox tool may be useful. Please use a decimal point as the decimal separator, e.g. 1.99 (and not 1,99) Examples: Returns observations within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark)
Returns observations within the bounding box having the Southwesterly point of 8.351697,55.421038 and northeasterly point of 8.542584,55.511345 (which basically covers the area of the city of Esbjerg in Denmark) |
bbox-crs |
Specifies the coordinate reference system of the bbox parameter. This service only support the CRS84 coordinate reference system. Example: Returns observations within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark) using the CRS84 coordinate reference system |
period |
Can only be used for the observation collection. Most users will combine the "period" filtering with other query filters such as a specific bbox or a specific station. Some intervals will need some adjustment depending on the context and in some edge cases, e.g.: subtracting a month from 31th March will result in an invalid date 31th February, hence it will be adjusted to 28th/29th February respectively. Available values:
Examples: Returns the latest observation (ONLY ONE)
Returns the latest observations within the last 10 minutes.
Returns the latest observation for the station having the stationId 30017. |
parameterId |
Narrow the search to a specific parameter id. Overview of available parameters can be found here. Can only be used for the observation collection Example: Returns observations having the parameter ID "tw" (water temperature) |
sortorder |
Sorts returned objects. Asking for results to be sorted should only be done when it is needed - responses are generally faster when asking for results with no sorting. Can only be used for the observation collection Example: Returns the response sorted by the observed time in descending order |
status |
Narrow the search to only allow stations having a specific status Can only be used for the station collection Available status values can be found here You can read more about how to deal with the status and the datetime parameter in the context of stations here. Examples: Returns stations having the status "Active" on the second of November 2020 or after. This could also be considered "the list of all active stations" if the datetime parameter is set to the current date.
Returns stations having the status "Active" at some time. This means that this also returns stations that have been active at some earlier time but no longer are. Also see "validFrom" and "validTo" fields. |
type |
Narrow the search to only allow stations having a specific type Can only be used for the station collection Available type values can be found here Example: Returns stations having the type "Tide-gauge-primary" |
predictionType |
Only valid for tidewater collection. Filter by tidewater prediction type - minimum, maximum, 10minutes or minimum_maximum (both minimum and maximum). Example: Returns 10minutes tidewater predictions: |
Examples: Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark), returning a maximum of 100 objects skipping the first 1000.
Returns observations within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and limited to the station having the id "30017" and the parameter having the id "tw", returning a maximum of 20000 objects in total sorted by the "observed" time in descending order
Returns stations having the type "Tide-gauge-primary" and status "Active" and is within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark).
Returns tidewater predictions for January 2024 for station 20333 |
The API is an OGC API - Features API and follows this standard as documented here: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html.
Data is returned in a FeatureCollection object that describes the returned data-set. Data points are found in the features field which contains a number of Feature objects as described below.
Feature objects are wrapped in a GeoJSON FeatureCollection, which include:
Key | Not null | Data Type | Description |
---|---|---|---|
type | yes | String | Always equal to "FeatureCollection" |
features | yes | list<Feature> | See below for the description of the specific feature |
timeStamp | yes | String | Timestamp when the response was generated. In RFC3339 5.6 format. |
numberReturned | yes | Number | Number of Feature objects returned |
links | yes | List of Link objects |
Links to pages;
|
Key | Not null | Type | Description |
---|---|---|---|
id | yes | String | Internal database ID |
type | yes | String | Always equal to "Feature" |
geometry | yes | Object | Position of the station in GeoJSON format. For "Oberservation" objects it is derived from the station's location |
geometry.coordinates.0 | yes | float | longitude in WGS84 |
geometry.coordinates.1 | yes | float | latitude in WGS84 |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Parameter ID identifying the parameter by a name |
properties.stationId | yes | String | Station ID identifying the station |
properties.created | yes | String | Timestamp of create time in observation database in RFC3339 5.6 format |
properties.observed | yes | String | Observation time in RFC3339 5.6 format |
properties.value | yes | Object | Measured value |
properties.qcStatus | yes | String | What kind of Quality Control has been performed |
properties.qcResult | no | float | Result of Quality Control |
qcStatus | Description |
---|---|
none | No Quality Control has been performed |
auto | Automatic real-time Quality Control has been performed |
manual | Manual Quality Control has been performed |
qcResult | Description |
---|---|
<not present> | No errors found |
1.0 | Value check - water level too high |
2.0 | Value check – water level too low |
3.0 | Step check - change too big |
4.0 | Step check - value locked |
5.0 | Consistency check – water temperature error |
6.0 | Data is erroneous |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.instrumentParameter | yes | InstrumentParameter | N/A - Currently null |
properties.name | yes | String | Name of the station. See station list for a list of names |
properties.owner | yes | String | Owner of the station |
properties.type | yes | String | Station type. See here for available types |
properties.country | yes | String | Country code |
properties.regionId | no | String | Region id |
properties.stationId | yes | String | Station id |
properties.parameterId | yes | List<String> | List of parameterIds as defined in parameters list, which the station observes |
properties.status | yes | String | Possible values are "Active" or "Inactive" |
properties.wmoContryCode | no | String | WMO country code |
properties.wmoStationId | no | String | WMO station id |
properties.created | yes | String | Creation time in database (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.operationTo | no | String | Last date the station is operational in RFC3339 5.6 format. If the station is currently operational this field is null |
properties.operationFrom | yes | String | First date the station is operational in RFC3339 5.6 format |
properties.updated | no | String | Last station update in RFC3339 5.6 format. Update may be a new location, changes to instrument parameters etc |
properties.validTo | no | String | Last date the station sends valid data in RFC3339 5.6 format. For now this is the same as operationTo, but may change in future versions |
properties.validFrom | yes | String | First date the station sends valid data in RFC3339 5.6 format. For now this is the same as operationFrom, but may change in future versions |
This is a GeoJSON feature and is similar to the schema for observations, but have predictionTime and predictionType that are unique.
Key | Not null | Data Type | Description |
---|---|---|---|
properties.created | yes | String | Timestamp of when the prediction was made in RFC3339 5.6 format |
properties.predictionTime | yes | String | Timestamp for this prediction in RFC3339 5.6 format |
properties.predictionType | yes | String | See here for prediction types |
properties.stationId | yes | String | Station ID identifying the tidewater station - note that these are similar to, but not identical to observation stations |
properties.value | yes | Number | The predicted value |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.name | yes | String | Name of the station. See station list for a list of names |
properties.country | yes | String | Country code |
properties.stationId | yes | String | Station id |
properties.created | yes | String | Creation time in database (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
lowAstronomicalTide | yes | Number | Lowest Astronomical Tide for this station. See description here. |
meanLowWaterSpring | Yes | Number | Mean Low Water Spring. See description here. |