This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
dd.v20.raml
301 lines (283 loc) · 10.7 KB
/
dd.v20.raml
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
#%RAML 1.0
title: Digitale Delta - API
version: 2.0.1
securitySchemes:
basic:
type: Basic Authentication
openidconnect:
type: OAuth 2.0
baseUri: http://api.rws.nl/dl/
mediaType: [ application/json ]
description: Digital Delta API version 2.0.1
documentation:
- title: Introduction
content: !include documentation/dd/Introduction.md
- title: Document history
content: !include documentation/dd/Document_History.md
- title: The API specification
content: !include documentation/dd/The_API_Specification.md
- title: End points specification
content: !include documentation/dd/End_Points_Specification.md
# HTTP is included as protocol but is optional as for security reasons a Provider might decide to support HTTPS only.
protocols:
- HTTP
- HTTPS
uses:
DD-T: libraries/dd-base-types.raml
GENERIC-RESP: libraries/generic-response-types.raml
DD-RESP: libraries/dd-response-types.raml
TRAITS: libraries/dd-traits.raml
#
# All data types are defined in external files (see above) so they can be shared between DD and DD-OPER API.
#
types:
#
# The resources
/dd/2.0:
# ##################################################
/nodes:
get:
description: |
A (data)node is an area from which resource objects can be retrieved.
is: [ TRAITS.pageable, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError ]
queryParameters:
process?:
type: DD-T.ProcessName
name?:
type: string
description: (Partial) name of the node. Partial meaning startsWith(...).
example: RwsPrimaryNode
responses:
200:
description: |
Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.NodeListResponse
example: !include examples/dd-nodelist-response.json
/{nodeId}:
uriParameters:
nodeId:
type: DD-T.Identifier
is: [ TRAITS.has403-AccessDeniedError, TRAITS.has404-NotFoundError, TRAITS.has500-ServerError ]
get:
description: Request a specific Node by its unique dentifier.
queryParameters:
process?:
type: DD-T.ProcessName
responses:
200:
description: |
Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.NodeResponse
example: !include examples/dd-node-response.json
# ##################################################
/sources:
is: [ TRAITS.pageable, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError ]
get:
description: |
A (data)source describes the source of the data. A node can have multiple data sources.
queryParameters:
process?:
type: DD-T.ProcessName
responses:
200:
description: Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.SourceListResponse
example: !include examples/dd-sourcelist-response.json
# #####################################################
/locations:
get:
description: |
Location objects contains all information required to describe a location.
is: [ TRAITS.pageable, TRAITS.has400-InvalidRequestError, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError, TRAITS.locationFilterable ]
queryParameters:
process?:
type: DD-T.ProcessName
boundingBox?:
type: DD-T.BoundingBox
locationName?:
type: DD-T.LocationName
nodeId?:
type: DD-T.Identifier
description: This query parameter is deprecated.
locationCode?:
type: DD-T.LocationCode
locationId?:
type: DD-T.Identifier
responses:
200:
description: Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.LocationListResponse
example: !include examples/dd-locationslist-response.json
/geojson:
get:
description: |
Retrieve location resources. Response is in GeoJSON FeatureCollection format (see https://tools.ietf.org/html/rfc7946#page-12).
is: [ TRAITS.has400-InvalidRequestError, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError, TRAITS.locationFilterable ]
queryParameters:
process?:
type: DD-T.ProcessName
boundingBox?:
type: DD-T.BoundingBox
locationName?:
type: DD-T.LocationName
nodeId?:
type: DD-T.Identifier
description: This query parameter is deprecated.
locationCode?:
type: DD-T.LocationCode
locationId?:
type: DD-T.Identifier
responses:
200:
description: Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.LocationListResponseGeoJSON
example: !include examples/dd-locationslist-response-geojson.json
/{locationId}:
description: Request a specific location by its id. Response is always in GeoJSON Feature format (see https://tools.ietf.org/html/rfc7946#page-11).
uriParameters:
locationId:
type: DD-T.Identifier
is: [ TRAITS.has403-AccessDeniedError, TRAITS.has404-NotFoundError, TRAITS.has500-ServerError ]
get:
description: |
Request a specific Location by its unique dentifier.
queryParameters:
process?:
type: DD-T.ProcessName
default: measurement
responses:
200:
description: |
Succesfully retrieved resource
body:
application/json:
type: object
example: !include examples/dd-location-response.json
######################################################
/observationTypes:
get:
description: |
ObservationType objects describe all attributes to correctly interpret what has been measured, and in what way. It is essential to have the quantity field.
is: [ TRAITS.pageable, TRAITS.has400-InvalidRequestError, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError, TRAITS.observationTypeFilterable ]
queryParameters:
process?:
type: DD-T.ProcessName
observationTypeId?:
type: DD-T.Identifier
quantity?:
description: Retrieve only observation types that contain the specified quantity.
type: string
parameterCode?:
description: Retrieve only observation types that contain the specified parameter code.
type: string
responses:
200:
description: |
Succesfully retrieved timeseries.
body:
application/json:
type: DD-RESP.ObservationTypeListResponse
example: !include examples/dd-observationtypelist-response.json
/{observationTypeId}:
is: [ TRAITS.has403-AccessDeniedError, TRAITS.has404-NotFoundError, TRAITS.has500-ServerError ]
uriParameters:
observationTypeId:
type: DD-T.Identifier
get:
description: Request a specific ObservationType by its unique identifier.
queryParameters:
process?:
type: DD-T.ProcessName
responses:
200:
description: |
Succesfully retrieved resource.
body:
application/json:
type: DD-RESP.ObservationTypeResponse
example: !include examples/dd-observationtype-response.json
######################################################
/timeseries:
get:
description: |
TimeSeriesType objects describe the type of measurement the timeseries contains. These can be for example raw measurements, but also aggregations or simulations. This information could be needed to correctly interpret the measurement values.
A request where both startTime and endTime are omitted returns a response with just the metadata.
is: [ TRAITS.pageable, TRAITS.has400-InvalidRequestError, TRAITS.has403-AccessDeniedError, TRAITS.has500-ServerError, TRAITS.timeseriesFilterable, TRAITS.locationFilterable, TRAITS.observationTypeFilterable ]
queryParameters:
process?:
type: DD-T.ProcessName
startTime?:
type: DD-T.StartTime
endTime?:
type: DD-T.EndTime
locationCode?:
type: DD-T.LocationCode
locationName?:
type: DD-T.LocationName
sourceName?:
type: DD-T.SourceName
observationTypeId?:
type: DD-T.Identifier
realizationCount?:
description: Added Count as this is the name in ObservationType response.
type: integer
parameterCode?:
description: Implementation is optional. Preferably to be implemented by means of the generic filtering mechanism.
type: string
quantity?:
description: Implementation is optional. Preferably to be implemented by means of the generic filtering mechanism.
type: string
valueType?:
description: Value type (float, integer, categorized).
type: string
nodeId?:
type: DD-T.Identifier
qualifier?:
description: Filter for the optional qualifier property.
type: string
aspectSet?:
type: DD-T.AspectSetName
description: Remark: Only required for systems that implement aspect sets
quantityName?:
type: DD-T.QuantityName
description: Remark: Only required for systems that are accessed by RWS's MKK-DL
intervalLength?:
type: DD-T.IntervalLength
description: Remark: Only required for systems that are accessed by RWS's MKK-DL
responses:
200:
description: |
Succesfully retrieved timeseries.
body:
application/json:
type: DD-RESP.TimeseriesListResponse
example: !include examples/dd-timeserieslist-response-verwachtingen-en-metingen-fulldd.json
/{timeseriesId}:
uriParameters:
timeseriesId:
type: DD-T.Identifier
is: [ TRAITS.has403-AccessDeniedError, TRAITS.has404-NotFoundError, TRAITS.has500-ServerError ]
get:
description: Request a specific (single) Timeseries by its unique identifier.
queryParameters:
process?:
type: DD-T.ProcessName
default: measurement
responses:
200:
description: |
Succesfully retrieved resource
body:
application/json:
type: DD-RESP.TimeseriesResponse
example: !include examples/dd-timeseries-response-single.json