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/metObs/collections/observation/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) observations.
Example: https://dmigw.govcloud.dk/v2/metObs/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": [
10.4398,
55.3088
],
"type": "Point"
},
"id": "02453972-f3fe-72b5-8d30-3f24a89107d9",
"type": "Feature",
"properties": {
"created": "2023-10-26T09:19:43.376959Z",
"observed": "2023-10-26T09:20:00Z",
"parameterId": "leav_hum_dur_past10min",
"stationId": "06126",
"value": 0.0
}
}
],
"timeStamp": "2023-10-26T09:19:51Z",
"numberReturned": 1,
"links": [
{
"href": "https://dmigw.govcloud.dk/v2/metObs/collections/observation/items?limit=1&sortorder=observed,DESC",
"rel": "self",
"type": "application/geo+json",
"title": "This document"
},
{
"href": "https://dmigw.govcloud.dk/v2/metObs/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/metObs/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: 500.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 "05185" |
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 05185. |
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 "pressure_at_sea" (Atmospheric pressure reduced to mean sea level) |
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 "Synop" (Weather stations that register a wide variety of meteorological parameters) |
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 a 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 "06149" and the parameter having the id "temp_dry", returning a maximum of 20000 objects in total sorted by the "observed" time in descending order
Returns stations having the type "Pluvio" and was "Active" sometime in the month of November 2020 (but not necessarily the whole month) 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) |
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 object, 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 object |
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 |
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 (the list of parameters) |
properties.stationId | yes | String | Station ID identifying the station (the list of stations) |
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 |
This is a GeoJSON Feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.barometerHeight | no | float | Height above sea level in meters of the station's barometer |
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 | Three-letter ISO 3166-1 alpha-3 country code |
properties.regionId | no | String | WMO 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 |
properties.stationHeight | no | Number | Height above sea level in meters of the station's height |