-
Notifications
You must be signed in to change notification settings - Fork 4
/
swagger.yaml
366 lines (340 loc) · 10.4 KB
/
swagger.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
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
openapi: 3.0.0
info:
version: 1.2.2
title: Routing Service API
description: API specification of the Routing Service
license:
name: GPLv3
url: https://www.gnu.org/licenses/gpl-3.0.html
contact:
name: Javier Quinteros
url: https://www.gfz-potsdam.de/staff/javier.quinteros/sec24
email: [email protected]
servers:
- url: 'https://geofon.gfz-potsdam.de/eidaws/routing/1'
description: Routing Service at GEOFON
paths:
/version:
get:
summary: Get version of the code
description: Returns a string specifying the version.
responses:
'200':
description: Version of the code
content:
text/plain:
schema:
type: string
/endpoints:
get:
summary: Get a list of URLs pointing to the endpoints providing routes to this Routing Service
description: Returns a string with a URL in each line. Each URL points to an endpoint providing routes which have been imported into this Routing Service.
responses:
'200':
description: URLs to endpoints
content:
text/plain:
schema:
type: string
/localconfig:
get:
summary: Get the local routes and virtual networks
description: Returns an XML file with local routes and virtual networks.
responses:
'200':
description: Routes and virtual networks
content:
application/xml:
schema:
type: string
/globalconfig:
get:
summary: Get information about the data centre
description: Returns information as requested by FDSN in JSON format.
responses:
'200':
description: Data centre information
content:
application/json:
schema:
type: string
parameters:
- name: format
in: query
description: Format of the output
required: true
schema:
type: string
enum:
- "fdsn"
/info:
get:
summary: Get human readable description of the routes included in this instance of the Routing Service.
description: Returns a description of the routes included in this Routing Service.
responses:
'200':
description: Information about the routes available in this Routing Service.
content:
text/plain:
schema:
type: string
/application.wadl:
get:
summary: Get the description of the service in WADL format
description: Returns the WADL description of the Routing Service.
responses:
'200':
description: WADL description of the service
content:
application/xml:
schema:
type: string
/query:
get:
summary: Get routes to request the (meta)data specified by the parameters
description: Returns a list of routes which should be used to get the data.
parameters:
- name: network
in: query
description: Network code
required: false
schema:
type: array
items:
type: string
default: '*'
style: form
explode: false
- name: station
in: query
description: Station code
required: false
schema:
type: array
items:
type: string
default: '*'
style: form
explode: false
- name: location
in: query
description: Location code
required: false
schema:
type: array
items:
type: string
default: '*'
style: form
explode: false
- name: channel
in: query
description: Channel code
required: false
schema:
type: array
items:
type: string
default: '*'
style: form
explode: false
- name: starttime
in: query
description: Start time of the time window
required: false
schema:
type: string
format: date-time
- name: endtime
in: query
description: End time of the time window
required: false
schema:
type: string
format: date-time
- name: service
in: query
description: Service type
required: false
schema:
type: string
default: "dataselect"
- name: minlatitude
in: query
description: Limit to stations with latitude larger than or equal to the specified minimum.
required: false
schema:
type: number
format: float
minimum: -90.0
maximum: 90.0
default: -90.0
- name: maxlatitude
in: query
description: Limit to stations with latitude smaller than or equal to the specified maximum.
required: false
schema:
type: number
format: float
minimum: -90.0
maximum: 90.0
default: 90.0
- name: minlongitude
in: query
description: Limit to stations with longitude larger than or equal to the specified minimum.
required: false
schema:
type: number
format: float
minimum: -180.0
maximum: 180.0
default: -180.0
- name: maxlongitude
in: query
description: Limit to stations with longitude smaller than or equal to the specified maximum.
required: false
schema:
type: number
format: float
minimum: -180.0
maximum: 180.0
default: 180.0
- name: format
in: query
description: Format of the output
required: false
schema:
type: string
default: "xml"
enum:
- "xml"
- "json"
- "get"
- "post"
- name: alternative
in: query
description: Include alternative routes in the output
required: false
schema:
type: boolean
default: false
enum:
- false
- true
responses:
'200':
$ref: '#/components/responses/Routes'
'204':
description: No data available with the specified parameters.
'400':
description: Bad request due to improper specification, unrecognized parameter, parameter value out of range, etc.
content:
text/plain:
schema:
type: string
'413':
description: Request would result in too much data being returned or the request itself is too large. Returned error message should include the service limitations in the detailed description. Service limits should also be documented in the service WADL.
'414':
description: Request URI too large.
default:
description: Unexpected error
content:
text/plain:
schema:
$ref: '#/components/responses/Standard4XXErrorResponse'
post:
summary: Get routes to request the (meta)data specified in the body
description: Returns a list of routes which should be used to get the data.
requestBody:
content:
# a plain text with the time windows
text/plain:
schema:
type: string
responses:
'200':
$ref: '#/components/responses/Routes'
'204':
description: No data available with the specified parameters.
'400':
description: Bad request due to improper specification, unrecognized parameter, parameter value out of range, etc.
content:
text/plain:
schema:
type: string
'413':
description: Request would result in too much data being returned or the request itself is too large. Returned error message should include the service limitations in the detailed description. Service limits should also be documented in the service WADL.
'414':
description: Request URI too large.
default:
description: Unexpected error
content:
text/plain:
schema:
$ref: '#/components/responses/Standard4XXErrorResponse'
components:
schemas:
ParamsSet:
description: Set of parameters to create a query together with the URL.
type: object
properties:
net:
type: string
sta:
type: string
loc:
type: string
cha:
type: string
start:
type: string
format: date-time
end:
type: string
format: date-time
priority:
type: number
Route:
type: object
properties:
name:
type: string
url:
type: string
params:
description: List of parameters to create many queries with the same URL.
type: array
items:
$ref: '#/components/schemas/ParamsSet'
responses:
Routes:
description: List of routes to request the specified (meta)data.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Route'
application/xml:
schema:
type: array
items:
$ref: '#/components/schemas/Route'
text/plain:
schema:
type: string
examples:
getformat:
# FIXME How to express the list of urls?
summary: This is an example of the get format
value: "http://server.domain/path/query?key=value"
postformat:
# FIXME How to express the array of blocks of url and parameters?
summary: This is an example of the post format
value: "http://server.domain/path/query\nNET STA LOC CHA 2010-01-01T00:00:00Z 2010-01-02T00:00:00Z"
Standard4XXErrorResponse:
description: Bad Request.
content:
text/plain:
schema:
type: string