-
Notifications
You must be signed in to change notification settings - Fork 5
/
environment-data-gov-uk-flood-monitoring.yaml
124 lines (118 loc) · 3.91 KB
/
environment-data-gov-uk-flood-monitoring.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
openapi: 3.0.0
info:
title: UK Flood Monitoring APIs
version: 1.0.0
description: |
APIs for accessing Environment Agency data.
The Environment Agency issue warnings of floods that cover specific warning or alert areas. The floods API provides a listing of all current such warnings and is updated every 15 minutes.
A warning may be at one of four possible severity levels:
Level Name - Meaning
* 1 - Severe Flood Warning Severe Flooding, Danger to Life.
* 2 - Flood Warning Flooding is Expected, Immediate Action Required.
* 3 - Flood Alert Flooding is Possible, Be Prepared.
* 4 - Warning no Longer in Force The warning is no longer in force
servers:
- url: https://environment.data.gov.uk/flood-monitoring
paths:
/id/floods:
get:
summary: Get all flood warnings and alerts
description: |
Get all flood warnings and alerts.
Area code is present in the response which can be used to call getFloodAreaDetails.
Use lat and long and r to return only warnings applying to flood areas which are within r km of the given latitude/longitude (in WGS84 coordinates), this may be approximated by a bounding box.
parameters:
- in: query
name: _offset
schema:
type: integer
- in: query
name: _limit
schema:
type: integer
- in: query
name: min-severity
description: Filter by minimum severity level (1-4)
schema:
type: integer
minimum: 1
maximum: 4
- in: query
name: county
description: Return only warnings applying to flood areas whose county name contains the string x. x can be a list of county names separated by "," in which case alerts which mention any of the named counties will be returned.
schema:
type: string
- in: query
name: lat
description: Latitude of point to search from
schema:
type: number
required: false
- in: query
name: long
description: Longitude of point to search from
schema:
type: number
required: false
- in: query
name: dist
description: Distance in kilometers from point to search from
schema:
type: integer
responses:
'200':
description: A list of flood warnings and alerts
content:
application/json:
schema:
type: object
properties:
items:
type: array
items:
type: object
metadata:
type: object
properties:
count:
type: integer
offset:
type: integer
limit:
type: integer
'404':
description: Flood warnings not found
/id/floods/{id}:
get:
parameters:
- name: id
in: path
required: true
schema:
type: string
description: Get details of flood
operationId: getFloodWarningDetails
responses:
'200':
description: Details of a flood warning or alert
content:
application/json:
schema:
type: object
/id/floodAreas/{area-code}:
get:
parameters:
- name: area-code
in: path
required: true
schema:
type: string
description: Get details of flood area
operationId: getFloodAreaDetails
responses:
'200':
description: Details of a flood warning or alert
content:
application/json:
schema:
type: object