Here you can find all published alerts. To get a description of the alert standard CAP (Common Alerting Protocol) se CAP.

NOTE: If there are no active alerts, you will get an empty object in the response.

GET /api/version/2/alerts.{ext}


{ext} The suffix specifying which mediatype to use. See mediatypes for more information.

Area description

In every Alert there is an area element with an areaDesc element. The areaDesc value matches the id element in the district element in the published Districtviews.

CAP description

This is the most important objects you can find in every alert element.

Element with example Description
Each alert is given a unique id.
The date and time when the alert was created.
<code>latest_update 2017-01-22T14:20:25+01:00</code>
The date and time of the latest update. This timestamp is set each time the alert is updated with new information.
<code>system_version 2</code>
The current version of this alert. The version is increased each time the alert is updated with new information.
<code>system_alert_category warning</code>
This can be either one of "warning", "risk" or "message":
The "warning" option shows that this alert is an actual warning.
The "risk" option is used when current weather situation can develop into a warning situation of class 2 or higher.
The "message" option is used when there is no general warning situation, but for certain target groups the alert can still have an impact that should be notified.
<event>heavy rain</event>
The actual type of the alert.
  <value>Stora regnmängder</value>
The actual type of the alert, in Swedish.
  <value>Warning class 2 heavy rain</value>
The classification of the event.
  <value>Varning klass 2</value>
The classification of the event, in Swedish.
The color associated with the event class.
<headline>Västra Götaland</headline>
The headline.
<description>Mycket regn</description>
The description.
One or several (comma separated) district id:s showing which warning district(s) that is affected by the alert.


Example request and response for the /api/alerts level in different mediatypes. This response in not complete for the sake of readability.
NB! If there is only one warning, the JSON mediatype delivers just one alert object. Not an array with one object in it.

GET /api/version/2/alerts


GET /api/version/2/alerts.xml

GET /api/version/2/alerts.json