GET | https://<api base path>/v1.0/objects/updated/<atom entry uuid> |
Retrieves a feature collection of a warning event in a GeoJSON format.
For simplicity and accuracy you should use the URL supplied by the Atom Feed rather than composing the URL yourself. However, the URL pattern above is supplied for reassurance that you have the right link.
You get this URL from a specific entry
section in the Atom Feed document. It is found in the link
element which has the rel
attribute alternate
, in the href
attribute. There is a different URL for each entry. These updates only exist for 24 hours, so a regular polling of the Atom Feed should be relied upon. As well as that, it would be advisable to store the state of the warning within your application, in case of no updates or changes to a warning for more than 24 hours.
GeoJSON is an IETF specification for encoding geographic information in JSON. A useful file-viewer is available at http://geojson.io/. NSWWS warnings GeoJSON makes use of the freedom allowed by the spec to put extra information inside the properties
section of a GeoJSON feature
. The geometry
element of a NSWWS warning is always a MultiPolygon
.
x-api-key
- the key for authenticating your API request.
200
with a feature collection containing the warning that has been updated, whether it is issued, updated, expired or cancelled. If the event was an expiry then there may be more than one warning in the feature collection as it is possible for two warnings to expire at once.
Examining warningStatus
, and if it exists, warningUpdateDescription
we can see there are four possible states for a warning as follows
warningStatus |
warningUpdateDescription |
Description |
---|---|---|
ISSUED |
Does not exist | An issued warning |
ISSUED |
Does exist | An issued warning that has been updated with the reasons documented in warningUpdateDescription |
CANCELLED |
Does exist | Warning that has been cancelled with the reasons documented in warningUpdateDescription |
EXPIRED |
Does not exist | Warning that has expired naturally |
403
authentication has failed, is your API key correct?
404
this information is either no longer available or the URL is incorrect. Make sure you’re getting the URL from the latest version of the Atom Feed.
429
you have made too many requests to the API within a short period of time and rate-limiting has been triggered
Making a request
Note the warningStatus
and the absence of warningUpdateDescription
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"issuedDate": "2022-06-22T11:54:17Z",
"weatherType": [
"THUNDERSTORM"
],
"warningLikelihood": 4,
"warningLevel": "YELLOW",
"warningStatus": "ISSUED",
"warningHeadline": "Thunderstorms may bring some disruption on Wednesday afternoon and evening",
"whatToExpect": [
"Some flooding of a few homes and businesses, leading to some damage to buildings or structures",
"Some damage to a few buildings and structures from lightning strikes",
"Driving conditions will be affected by spray, standing water and/or hail, leading to longer journey times by car and bus",
"Delays to train services",
"Some short term loss of power and other services"
],
"warningId": "79bb1df2-8983-4bbd-888a-66da9c099a1c",
"warningVersion": "1.0",
"warningFurtherDetails": "Thunderstorms are expected to develop across northern parts of Scotland during Wednesday afternoon then slowly die out during Wednesday evening.\n\nDespite many areas seeing some showers most sites will see only small amounts of rainfall. However, there is a chance of a few sites seeing 20 mm of rain in an hour and 30-40 mm in 3 hours as well as lightning and some hail.",
"modifiedDate": "2022-06-22T11:54:17Z",
"validFromDate": "2022-06-22T11:54:00Z",
"affectedAreas": [
{
"regionName": "Highlands & Eilean Siar",
"regionCode": "HE",
"subRegions": [
"Highland"
]
},
{
"regionName": "Orkney & Shetland",
"regionCode": "OS",
"subRegions": [
"Orkney Islands"
]
}
],
"warningImpact": 2,
"validToDate": "2022-06-22T22:59:59Z"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-4.3726,
58.7226
],
[
-4.8779,
58.7796
],
[
-5.2734,
58.7796
],
[
-5.8008,
58.1243
],
[
-5.8447,
57.8915
],
[
-5.647,
57.7745
],
[
-4.5264,
57.7041
],
[
-3.1421,
57.8214
],
[
-2.7466,
57.9148
],
[
-2.4609,
58.0895
],
[
-2.2852,
58.4592
],
[
-2.5049,
58.6312
],
[
-2.8125,
58.6884
],
[
-4.3726,
58.7226
]
]
]
]
}
}
]
}
Note the warningStatus
and warningUpdateDescription
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"issuedDate": "2022-06-22T11:54:17Z",
"weatherType": [
"THUNDERSTORM"
],
"warningLikelihood": 4,
"warningUpdateDescription": "Extended warning area further east.",
"warningLevel": "YELLOW",
"warningStatus": "ISSUED",
"warningHeadline": "Thunderstorms may bring some disruption on Wednesday afternoon and evening",
"whatToExpect": [
"Some flooding of a few homes and businesses, leading to some damage to buildings or structures",
"Some damage to a few buildings and structures from lightning strikes",
"Driving conditions will be affected by spray, standing water and/or hail, leading to longer journey times by car and bus",
"Delays to train services",
"Some short term loss of power and other services"
],
"warningId": "79bb1df2-8983-4bbd-888a-66da9c099a1c",
"warningVersion": "2.0",
"warningFurtherDetails": "Thunderstorms are expected to develop across northern parts of Scotland during Wednesday afternoon then slowly die out during Wednesday evening.\n\nDespite many areas seeing some showers most sites will see only small amounts of rainfall. However, there is a chance of a few sites seeing 20 mm of rain in an hour and 30-40 mm in 3 hours as well as lightning and some hail.",
"modifiedDate": "2022-06-22T12:05:31Z",
"validFromDate": "2022-06-22T11:54:00Z",
"affectedAreas": [
{
"regionName": "Grampian",
"regionCode": "GR",
"subRegions": [
"Aberdeenshire",
"Moray"
]
},
{
"regionName": "Highlands & Eilean Siar",
"regionCode": "HE",
"subRegions": [
"Highland"
]
}
],
"warningImpact": 2,
"validToDate": "2022-06-22T22:59:59Z"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-3.4277,
58.7568
],
[
-4.6802,
58.7682
],
[
-5.1855,
58.6655
],
[
-5.6909,
58.3672
],
[
-5.7349,
58.1823
],
[
-5.3174,
57.7511
],
[
-4.9878,
57.5512
],
[
-4.7461,
57.3028
],
[
-4.3506,
57.0766
],
[
-4.1748,
57.0168
],
[
-3.208,
56.9689
],
[
-2.9883,
57.0049
],
[
-2.373,
57.2672
],
[
-2.2192,
57.6454
],
[
-2.395,
57.7511
],
[
-2.9883,
57.9498
],
[
-2.6367,
58.5167
],
[
-3.0981,
58.7112
],
[
-3.4277,
58.7568
]
]
]
]
}
}
]
}
Note the warningStatus
and warningUpdateDescription
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"issuedDate": "2022-06-22T11:54:17Z",
"weatherType": [
"THUNDERSTORM"
],
"warningLikelihood": 4,
"warningUpdateDescription": "Warning no longer required.",
"warningLevel": "YELLOW",
"warningStatus": "CANCELLED",
"warningHeadline": "Thunderstorms may bring some disruption on Wednesday afternoon and evening",
"whatToExpect": [
"Some flooding of a few homes and businesses, leading to some damage to buildings or structures",
"Some damage to a few buildings and structures from lightning strikes",
"Driving conditions will be affected by spray, standing water and/or hail, leading to longer journey times by car and bus",
"Delays to train services",
"Some short term loss of power and other services"
],
"warningId": "79bb1df2-8983-4bbd-888a-66da9c099a1c",
"warningVersion": "3.0",
"warningFurtherDetails": "Thunderstorms are expected to develop across northern parts of Scotland during Wednesday afternoon then slowly die out during Wednesday evening.\n\nDespite many areas seeing some showers most sites will see only small amounts of rainfall. However, there is a chance of a few sites seeing 20 mm of rain in an hour and 30-40 mm in 3 hours as well as lightning and some hail.",
"modifiedDate": "2022-06-22T12:07:38Z",
"validFromDate": "2022-06-22T11:54:00Z",
"affectedAreas": [
{
"regionName": "Grampian",
"regionCode": "GR",
"subRegions": [
"Aberdeenshire",
"Moray"
]
},
{
"regionName": "Highlands & Eilean Siar",
"regionCode": "HE",
"subRegions": [
"Highland"
]
}
],
"warningImpact": 2,
"validToDate": "2022-06-22T22:59:59Z"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-3.4277,
58.7568
],
[
-4.6802,
58.7682
],
[
-5.1855,
58.6655
],
[
-5.6909,
58.3672
],
[
-5.7349,
58.1823
],
[
-5.3174,
57.7511
],
[
-4.9878,
57.5512
],
[
-4.7461,
57.3028
],
[
-4.3506,
57.0766
],
[
-4.1748,
57.0168
],
[
-3.208,
56.9689
],
[
-2.9883,
57.0049
],
[
-2.373,
57.2672
],
[
-2.2192,
57.6454
],
[
-2.395,
57.7511
],
[
-2.9883,
57.9498
],
[
-2.6367,
58.5167
],
[
-3.0981,
58.7112
],
[
-3.4277,
58.7568
]
]
]
]
}
}
]
}
Note the warningStatus
and the absence of warningUpdateDescription
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"issuedDate": "2022-06-22T12:10:13Z",
"weatherType": [
"THUNDERSTORM"
],
"warningLikelihood": 4,
"warningLevel": "YELLOW",
"warningStatus": "EXPIRED",
"warningHeadline": "Thunderstorms may bring some disruption on Wednesday afternoon and evening",
"whatToExpect": [
"Some flooding of a few homes and businesses, leading to some damage to buildings or structures",
"Some damage to a few buildings and structures from lightning strikes",
"Driving conditions will be affected by spray, standing water and/or hail, leading to longer journey times by car and bus",
"Delays to train services",
"Some short term loss of power and other services"
],
"warningId": "fdf498a5-f61a-452e-967c-590431fda17a",
"warningVersion": "2.0",
"warningFurtherDetails": "Thunderstorms are expected to develop across northern parts of Scotland during Wednesday afternoon then slowly die out during Wednesday evening.\n\nDespite many areas seeing some showers most sites will see only small amounts of rainfall. However, there is a chance of a few sites seeing 20 mm of rain in an hour and 30-40 mm in 3 hours as well as lightning and some hail.",
"modifiedDate": "2022-06-22T12:15:10Z",
"validFromDate": "2022-06-22T12:10:00Z",
"affectedAreas": [
{
"regionName": "Grampian",
"regionCode": "GR",
"subRegions": [
"Aberdeenshire",
"Moray"
]
},
{
"regionName": "Highlands & Eilean Siar",
"regionCode": "HE",
"subRegions": [
"Highland"
]
},
{
"regionName": "Orkney & Shetland",
"regionCode": "OS",
"subRegions": [
"Orkney Islands"
]
}
],
"warningImpact": 2,
"validToDate": "2022-06-22T12:15:00Z"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-3.6255,
58.8592
],
[
-4.4824,
58.8706
],
[
-4.9658,
58.7682
],
[
-5.2295,
58.6198
],
[
-5.6689,
58.1359
],
[
-5.8008,
57.6454
],
[
-5.5591,
57.4568
],
[
-5.3613,
57.3739
],
[
-4.5923,
57.2196
],
[
-3.5596,
57.172
],
[
-2.6807,
57.3621
],
[
-2.5488,
57.6572
],
[
-3.0322,
57.9848
],
[
-2.5269,
58.3095
],
[
-2.439,
58.574
],
[
-2.5049,
58.6312
],
[
-2.9224,
58.7796
],
[
-3.6255,
58.8592
]
]
]
]
}
}
]
}