Meteorological Data API Documentation
This API provides access to data from meteorological station dato, one of the stations maintained by the MeteoKav group. The data is retrieved from a CKAN DataStore and is available in JSON and CSV formats.
Base URL
The base URL for all API requests to MeteoKav Datastores is: https://data.kavala.open-autonomy.com/restful/meteokav
Endpoint
Retrieve Meteorological Data
GET /dato
Retrieves meteorological data for station dato, with options to filter by date/time range, select specific fields, and choose the output format. Please note that the underlying SQL query has a maximum row limit of 50000.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
from |
string (YYYY-MM-DD HH:MM) |
Filter data starting from this date and time. | No |
to |
string (YYYY-MM-DD HH:MM) |
Filter data up to this date and time. If omitted, returns data up to the latest available record. | No |
fields |
string |
A comma-separated list of fields to include in the response. If omitted, all available fields are returned.
Available fields for the station:
DateAndTimeStamp field is always included in the response, even if not explicitly specified here.
|
No |
format |
string |
The format of the response. Available values: json (default), csv. |
No |
limit |
integer |
Maximum number of records to return. Default is 0 (no limit). | No |
offset |
integer |
Starting record number. Default is 0. | No |
Response
JSON Response
Returns a JSON object with the following structure:
{
"records_truncated": true, // included only if the result is truncated to the first 50000 records
"records": [
{
"DateAndTimeStamp": "2024-07-24T12:00:00",
"temperature": 25.5,
// ... other data fields
},
{
"DateAndTimeStamp": "2024-07-24T13:00:00",
"temperature": 26.2,
// ... other data fields
},
// ... more records, up to 50000
],
"fields": [
{"id": "DateAndTimeStamp", "type": "timestamp without time zone"},
{"id": "temperature", "type": "numeric"},
// ... other fields
]
}
CSV Response
Returns a CSV file with the specified fields (or all available fields if none are specified).
Example Requests
-
Get data for dato from 2024-07-24 10:00 to 2024-07-24 12:00, including temperature and humidity:
https://data.kavala.open-autonomy.com/restful/meteokav/dato?from=2024-07-24%2010:00&to=2024-07-24%2012:00&fields=temperature,humidity -
Get CSV data for dato from 2024-07-24 10:00 (up to 50000 records):
https://data.kavala.open-autonomy.com/restful/meteokav/dato?from=2024-07-24%2010:00&format=csv -
Get data for dato, with a limit of 50 records, starting from record 100:
https://data.kavala.open-autonomy.com/restful/meteokav/dato?limit=50&offset=100 -
Get all available data for dato (up to 50000 records):
https://data.kavala.open-autonomy.com/restful/meteokav/dato(orhttps://data.kavala.open-autonomy.com/restful/meteokav/dato?limit=0&offset=0) -
Get all available data for dato, starting from record 200 (up to 50000 records):
https://data.kavala.open-autonomy.com/restful/meteokav/dato?offset=200
Errors
The API may return the following HTTP status codes:
404 Not Found: The specified station does not exist.500 Internal Server Error: An error occurred while processing the request.