From 508ea05d6e4dc412334a41de222d56fd7ee478af Mon Sep 17 00:00:00 2001 From: Anna_Golonka Date: Fri, 24 May 2019 07:52:30 +0200 Subject: [PATCH 1/3] Documentation update with information about the need of encoding the special symbols in the requests made from browser or postman --- FORECAST-WEATHER-API-BLUEPRINT.apib | 14 ++++++++++++++ OBSERVATION-WEATHER-API-BLUEPRINT.apib | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/FORECAST-WEATHER-API-BLUEPRINT.apib b/FORECAST-WEATHER-API-BLUEPRINT.apib index 55ab211..ce30925 100644 --- a/FORECAST-WEATHER-API-BLUEPRINT.apib +++ b/FORECAST-WEATHER-API-BLUEPRINT.apib @@ -75,6 +75,20 @@ For multiple locations, its recommended to just use the point compression. The forecasts in the response collection are "flat" to allow easy streaming and filtering on client side. The forecasts in the response are ordered ascending by field 'validFrom'. +It is important to use encoded timestamps when doing the requests to Point Observation Service by for example POSTMAN or browser. +To encode properly the timestamp +1. go to https://www.urlencoder.org/ site +2. paste desired timestamp +3. without changing any parameters click "> ENCODE <" button +4. use generated encoded timestamp in the url + +Example: +URL before encoding (not working): +https://point-forecast.weather.mg/search?locatedAt=-2.44198,50.54282&validUntil=2019-05-26T00:00:00+02:00&timeZone=Europe/London&fields=maxAirTemperatureInFahrenheit,airTemperatureNearGroundInCelsius,relativeGlobalRadiationInPercent,airTemperatureInCelsius,windSpeedInKnots,windSpeedInKilometerPerHour,weatherSymbolCode,airTemperatureInKelvin,sunshineDurationInMinutes,stationLocation&validPeriod=PT1H,PT6H,PT24H + +URL after encoding (working): +https://point-forecast.weather.mg/search?locatedAt=-2.44198,50.54282&validUntil=2019-05-26T00%3A00%3A00%2B02%3A00&timeZone=Europe/London&fields=maxAirTemperatureInFahrenheit,airTemperatureNearGroundInCelsius,relativeGlobalRadiationInPercent,airTemperatureInCelsius,windSpeedInKnots,windSpeedInKilometerPerHour,weatherSymbolCode,airTemperatureInKelvin,sunshineDurationInMinutes,stationLocation&validPeriod=PT1H,PT6H,PT24H + *Fields mapping* Common names of filed which can be included in all periods: locatedAt,meteoGroupStationId,meteoGroupStationName,stationLocation,stationTimeZoneName,validFrom,validUntil,validPeriod,issuedAt diff --git a/OBSERVATION-WEATHER-API-BLUEPRINT.apib b/OBSERVATION-WEATHER-API-BLUEPRINT.apib index 75124bd..5e5a788 100644 --- a/OBSERVATION-WEATHER-API-BLUEPRINT.apib +++ b/OBSERVATION-WEATHER-API-BLUEPRINT.apib @@ -72,6 +72,20 @@ code description comment The 'shipCourseText' returns one of the following values: "not moving", "NE", "E", "SE", "S", "SW", "W", "NW", "N", "unknown". The 'shipSpeedRangeInKnots' returns one of the following values: "0", "1-5", "6-10", "11-15", "16-20", "21-25", "26-30", "31-35", "36-40", ">40", "unknown". +It is important to use encoded timestamps when doing the requests to Point Observation Service by for example POSTMAN or browser. +To encode properly the timestamp +1. go to https://www.urlencoder.org/ site +2. paste desired timestamp +3. without changing any parameters click "> ENCODE <" button +4. use generated encoded timestamp in the url + +Example: +URL before encoding (not working): +https://point-observation.weather.mg/observation/hourly?meteoGroupStationIds=10385&observedPeriod=PT0S&fields=meteoGroupStationId,meteoGroupStationName,airTemperatureInCelsius&observedFrom=2019-05-20T09:00:00+02:00&observedUntil=2019-05-21T09:00:00+02:00 + +URL after encoding (working): +https://point-observation.weather.mg/observation/hourly?meteoGroupStationIds=10385&observedPeriod=PT0S&fields=meteoGroupStationId,meteoGroupStationName,airTemperatureInCelsius&observedFrom=2019-05-20T09%3A00%3A00%2B02%3A00&observedUntil=2019-05-21T09%3A00%3A00%2B02%3A00 + *Gap filling* GapFilling allows to gap fill missing observations with forecast data from Point Forecast service for following parameters: From 867c42322b11cfe55409a547abac91d44ac2d79b Mon Sep 17 00:00:00 2001 From: Anna_Golonka Date: Fri, 24 May 2019 11:02:54 +0200 Subject: [PATCH 2/3] Wrong service name fixed --- FORECAST-WEATHER-API-BLUEPRINT.apib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FORECAST-WEATHER-API-BLUEPRINT.apib b/FORECAST-WEATHER-API-BLUEPRINT.apib index ce30925..872e19c 100644 --- a/FORECAST-WEATHER-API-BLUEPRINT.apib +++ b/FORECAST-WEATHER-API-BLUEPRINT.apib @@ -75,7 +75,7 @@ For multiple locations, its recommended to just use the point compression. The forecasts in the response collection are "flat" to allow easy streaming and filtering on client side. The forecasts in the response are ordered ascending by field 'validFrom'. -It is important to use encoded timestamps when doing the requests to Point Observation Service by for example POSTMAN or browser. +It is important to use encoded timestamps when doing the requests to Point Forecast Service by for example POSTMAN or browser. To encode properly the timestamp 1. go to https://www.urlencoder.org/ site 2. paste desired timestamp From 658bb6812f0ce6eb12a0305ef4bbb715f1fab149 Mon Sep 17 00:00:00 2001 From: Anna_Golonka Date: Fri, 24 May 2019 12:25:18 +0200 Subject: [PATCH 3/3] Code review changes --- FORECAST-WEATHER-API-BLUEPRINT.apib | 12 +++++++----- OBSERVATION-WEATHER-API-BLUEPRINT.apib | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/FORECAST-WEATHER-API-BLUEPRINT.apib b/FORECAST-WEATHER-API-BLUEPRINT.apib index 872e19c..1a28979 100644 --- a/FORECAST-WEATHER-API-BLUEPRINT.apib +++ b/FORECAST-WEATHER-API-BLUEPRINT.apib @@ -76,11 +76,13 @@ The forecasts in the response collection are "flat" to allow easy streaming and The forecasts in the response are ordered ascending by field 'validFrom'. It is important to use encoded timestamps when doing the requests to Point Forecast Service by for example POSTMAN or browser. -To encode properly the timestamp -1. go to https://www.urlencoder.org/ site -2. paste desired timestamp -3. without changing any parameters click "> ENCODE <" button -4. use generated encoded timestamp in the url + +To encode properly the timestamp: + +1. Go to https://www.urlencoder.org/ site. +2. Paste desired timestamp. +3. Without changing any parameters click "> ENCODE <" button. +4. Use generated encoded timestamp in the url. Example: URL before encoding (not working): diff --git a/OBSERVATION-WEATHER-API-BLUEPRINT.apib b/OBSERVATION-WEATHER-API-BLUEPRINT.apib index 5e5a788..441f2b8 100644 --- a/OBSERVATION-WEATHER-API-BLUEPRINT.apib +++ b/OBSERVATION-WEATHER-API-BLUEPRINT.apib @@ -73,11 +73,13 @@ The 'shipCourseText' returns one of the following values: "not moving", "NE", "E The 'shipSpeedRangeInKnots' returns one of the following values: "0", "1-5", "6-10", "11-15", "16-20", "21-25", "26-30", "31-35", "36-40", ">40", "unknown". It is important to use encoded timestamps when doing the requests to Point Observation Service by for example POSTMAN or browser. -To encode properly the timestamp -1. go to https://www.urlencoder.org/ site -2. paste desired timestamp -3. without changing any parameters click "> ENCODE <" button -4. use generated encoded timestamp in the url + +To encode properly the timestamp: + +1. Go to https://www.urlencoder.org/ site. +2. Paste desired timestamp. +3. Without changing any parameters click "> ENCODE <" button. +4. Use generated encoded timestamp in the url. Example: URL before encoding (not working):