Skip to content

Fetch warnings

MLyons-EA edited this page Sep 5, 2019 · 57 revisions

Overview

This endpoint returns active warnings published by the Environment Agency.

API endpoints

Test: TBC

Production: TBC

Request headers

Parameter name Values Description
Content-Type application/json returns warnings in JSON format
Content-Type application/xml returns warnings in XML format
x-api-key Request your keys here Authenticates access to the flood warnings api. We will provide separate keys for the production and test environment

Example

{
    "warnings": [
        {
            "situation": "DS Test 2",
            "attr": {
                "taId": 33729,
                "taCode": "065FWC2602",
                "taName": "Littlehampton East Bank",
                "taDescription": "Tidal areas of Littlehampton East Bank including Caffyn's Field, and Riverside Industrial Estate",
                "quickDial": "316035",
                "version": "5",
                "taCategory": "Flood Warning",
                "ownerArea": "Solent and South Downs",
                "createdDate": "2017-11-06T00:00:00.000Z",
                "lastModifiedDate": "2018-02-21T00:00:00.000Z",
                "situationChanged": "2019-07-23T17:15:00.000Z",
                "severityChanged": "2019-07-23T17:14:00.000Z",
                "timeMessageReceived": "2019-07-23T17:15:05.818Z",
                "severityValue": "3",
                "severity": "Severe Flood Warning"
            }
        }
    ]
}

Data dictionary

Information describing the contents when fetching warnings

Element name Description Format Values
situation A written description published by the Environment Agency for a specific target area, that provides information and guidance on the flood situation String The lake level has now peaked and is dropping in response to drier weather overnight. The level at the Lodore gauge still remains above the 1.8m flood warning level. The lake is expected to continue to fall and may drop below warning level today, Friday 23/8/19. We continue to monitor the situation closely and will update this message if the situation changes.
taID Unique ID (combination of TA Code and Version). When a new version is created, so is a taID String (50) f97b31ac0ab7aa453ff38ba6032cef1e
taCode Unique id used to identify a target area. String (50) 012FWFL43B
taName The name of the target area String (100) River Ribble at Samlesbury, beside the river including the Tickled Trout hotel and service station
taDescription A written description of the area covered String (254) Tidal areas of Littlehampton East Bank including Caffyn's Field, and Riverside Industrial Estate
quickDial The telephone quick dial code used to access recorded messages over the phone String (50) 316035
version A new version is created whenever a ‘content’ update is made to the target area. A new version is not created when the target area changes severity. Int 5
taCategory The state of the warning String (50) Can be one of four values. Severe flood warning, flood warning, flood alert, no longer in force
ownerArea The name of the area team at the Environment Agency who are responsible for the warning message String (50) Cumbria and Lancashire
createdDate The date and time the current version of the target area was created date/time (UTC) 2017-11-06T00:00:00.000Z
lastModifiedDate The date and time the current version of the target was last modified date/time (UTC) 2017-12-06T00:00:00.000Z
situationChanged The date and time the situation was changed date/time (UTC) 2019-08-06T00:00:00.000Z
severityChanged The date and time the severity was changed date/time (UTC) 2019-08-06T00:00:00.000Z
timeMessageReceived The date and time the warning message was received by the API gateway date/time (UTC) 2019-08-06T00:00:00.000Z
severityValue an int value that maps to severity int 1 = flood alert, 2 = flood warning, 3 = severe flood warning, 4 = no longer in force
severity a description of the flooding severity String (50) flood alert, flood warning, severe flood warning, no longer in force

If you're consuming fwis.nfwc.ea.gov/xml

If you're currently consuming fwis.nfwc.ea.gov/xml, be aware of these changes when switching:

Element name in flood warnings API Comments Element used in fwis.nfwc.ea.gov/xml
situation The flood warnings API publishes English language only rim_english
taID Does not feature in fwis.nfwc.ea.gov/xml N/A
taCode N/A fwacode
taName N/A description
taDescription Does not feature in fwis.nfwc.ea.gov/xml N/A
quickDial Does not feature in fwis.nfwc.ea.gov/xml N/A
version Does not feature in fwis.nfwc.ea.gov/xml N/A
taCategory Does not feature in fwis.nfwc.ea.gov/xml N/A
ownerArea N/A area
createdDate Does not feature in fwis.nfwc.ea.gov/xml N/A
lastModifiedDate Does not feature in fwis.nfwc.ea.gov/xml N/A
situationChanged N/A rim_changed
severityChanged N/A severity_changed
timeMessageReceived N/A timerasied
severityValue The mapping to warning has changed. See the data dictionary for details severityvalue

Elements used in fwis.nfwc.ea.gov/xml that are not used in the flood warnings API

  • Warningkey
  • Region
  • Fwakey
  • Rim_welsh
  • Language

Requesting support

When something goes wrong, it's likely that one of these HTTP status codes will be returned:

Fault codes What the code means
503 The service is unavailable
403 Unauthorised access

Before requesting support

  • Check that you are using the API key issued to you by the Environment Agency. If you don't have a key, you can request one here
  • Check your IT infrastructure is not at fault, eg that your internet service is available
  • Make sure you have something to record the incident number, which the Environment Agency will issue to you

When raising a support call, you'll need this information:

  • organisation name
  • contact name during the fault resolution process
  • contact phone number and email address that the Environment Agency can use for correspondence
  • fault codes you are seeing and/or a description of the fault, with screen shots if possible

Raising a support call

To ensure the call is handled correctly you should state that the fault relates to the flood warnings API service.

Between 08:00 and 17:30 on weekdays, excluding bank holidays, contact the Environment Agency’s National Customer Contact Centre (NCCC) on 03708 506 506. This is a 'log and refer' service so the incident reference may not be provided during your call.

Between 17:31 and 07.59 on weekdays, and between 00.00 and 24.00 on weekends and bank holidays, contact our helpdesk on 0330 303 4424.

Enquiries which have no service impact should be emailed to floodwarningservices@environment-agency.gov.uk

We aim to respond to these enquiries within 5 working days.

What happens after a support call has been raised?

When a fault is logged you'll be given an incident reference. You'll need this in any further communications with the Environment Agency.

Is there anything wrong with this page? Tell us by emailing floodwarningservices@environment-agency.gov.uk

Clone this wiki locally