-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.json
420 lines (420 loc) · 15.4 KB
/
openapi.json
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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
{
"openapi": "3.0.1",
"info": {
"title": "efgs-federation-gateway",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
},
"version": "1.0.0-SNAPSHOT"
},
"servers": [{
"url": "http://localhost:8090",
"description": "Generated server url"
}
],
"paths": {
"/diagnosiskeys/audit/download/{date}/{batchTag}": {
"get": {
"tags": ["Diagnosis Keys Exchange Interface", "Audit"],
"summary": "Gets audit information about the selected batchtag on a specific date.",
"operationId": "getAuditInformation",
"parameters": [{
"name": "date",
"in": "path",
"description": "date with which the database is searched.",
"required": true,
"schema": {
"type": "string",
"format": "date"
},
"example": "2020-09-04"
}, {
"name": "batchTag",
"in": "path",
"description": "batchTag with which the database is searched.",
"required": true,
"schema": {
"type": "string"
},
"example": "20200730-1"
}, {
"name": "Accept",
"in": "header",
"required": true,
"example": "application/json"
}
],
"responses": {
"200": {
"description": "OK. Returns the audit information to the selected batch.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuditEntry"
}
}
}
}
},
"400": {
"description": "Invalid or missing request header."
},
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"404": {
"description": "BatchTag not found or no data exists."
},
"406": {
"description": "Data format or content is not valid."
},
"410": {
"description": "Date for download expired. Date does not more exists."
}
}
}
},
"/diagnosiskeys/callback": {
"get": {
"tags": ["Diagnosis Keys Exchange Interface", "Callback"],
"summary": "Gets the current callback subscription URLs.",
"operationId": "getCallbackSubscriptions",
"responses": {
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"200": {
"description": "OK."
}
}
}
},
"/diagnosiskeys/callback/{id}": {
"put": {
"tags": ["Diagnosis Keys Exchange Interface", "Callback"],
"summary": "Create or Update new callback subscription URL.",
"operationId": "putOrUpdateCallbackSubscription",
"parameters": [{
"name": "id",
"in": "path",
"description": "callbackId of the entry",
"required": true,
"schema": {
"type": "string"
},
"example": "ABC"
}, {
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"example": "https://example.org"
}
],
"responses": {
"200": {
"description": "OK."
},
"400": {
"description": "One or more parameters are invalid."
},
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"406": {
"description": "URL has not the expected format."
},
"500": {
"description": "Not able to write data. Retry please."
}
}
},
"delete": {
"tags": ["Diagnosis Keys Exchange Interface", "Callback"],
"summary": "Delete callback URL.",
"operationId": "deleteCallbackSubscription",
"parameters": [{
"name": "id",
"in": "path",
"description": "callbackId of the entry",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK."
},
"400": {
"description": "The given callbackId is not valid."
},
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"404": {
"description": "Id not found or no data exists."
},
"500": {
"description": "Not able to write data. Retry please."
}
}
}
},
"/diagnosiskeys": {
"options": {
"tags": ["Diagnosis Keys Exchange Interface"],
"summary": "Options for diagnosis keys. E.g. supported media types",
"description": "Offers the options for the diagnosiskeys routes.",
"operationId": "getOptions",
"responses": {
"200": {
"description": "OK.",
"headers": {
"Accept": {
"style": "simple",
"schema": {
"example": "application/json; version=1.0, application/protobuf; version=1.0"
}
},
"Allow": {
"style": "simple",
"schema": {
"example": "POST,GET,OPTIONS"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/diagnosiskeys/download/{date}": {
"get": {
"tags": ["Diagnosis Keys Exchange Interface", "Download"],
"summary": "Downloads diagnosis keys dataset by date.",
"description": "Downloads the latest data by date. The date indicates the start point for query. Means the last 5 Days are currentDate-5",
"operationId": "downloadDiagnosisKeys",
"parameters": [{
"name": "date",
"in": "path",
"description": "Date from where the query should start until today.",
"required": true,
"schema": {
"type": "string",
"format": "date"
},
"example": "2020-07-31"
}, {
"name": "batchTag",
"in": "header",
"description": "Optional Tag to submit the last received batchTag of the day.",
"required": false,
"schema": {
"type": "string"
},
"example": "20200731-1"
}
],
"responses": {
"200": {
"description": "OK.",
"headers": {
"batchTag": {
"description": "Tag of the batch.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
},
"nextBatchTag": {
"description": "Tag of the next available batch of the day. Has the value \"null\" if no further BatchTag exists for requested date",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json+v1.0": {
"example": "diagnosisKeyBatch"
}
}
},
"400": {
"description": "Invalid or missing request header."
},
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"404": {
"description": "BatchTag not found or no data exists."
},
"406": {
"description": "Data format or content is not valid."
},
"410": {
"description": "Date for download expired. Date does not more exists."
}
}
}
},
"/diagnosiskeys/upload": {
"post": {
"tags": ["Diagnosis Keys Exchange Interface", "Upload"],
"summary": "Uploads diagnosis key datasets.",
"description": "Uploads the given batch to the server. Uploader Information is given by the client certificate.",
"operationId": "uploadDiagnosisKeys",
"parameters": [{
"name": "batchTag",
"in": "header",
"description": "Required Tag to tag the send batch (must be not unique).",
"required": true,
"schema": {
"type": "string"
},
"example": "20200731-1"
}, {
"name": "batchSignature",
"in": "header",
"description": "PKC7 Payload signature in Base64 encoding.",
"required": true,
"schema": {
"type": "string"
},
"example": "ABDBJ345231DJ122..."
}, {
"name": "Content-Type",
"in": "header",
"required": true,
"schema": {
"type": "string"
},
"example": "application/protobuf; version=1.0"
}
],
"requestBody": {
"description": "Requestbody with payload. (limited)",
"content": {
"application/protobuf; version=1.0": {},
"application/json; version=1.0": {}
}
},
"responses": {
"201": {
"description": "Database Entries created.",
"headers": {
"batchTag": {
"description": "Tag of the batch.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
}
},
"207": {
"description": "Data partially added with warnings. More details in document.",
"headers": {
"batchTag": {
"description": "Tag of the batch.",
"required": true,
"style": "simple",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json+v1.0": {
"example": "{\n '201': [1,2,5,8,9],\n '409': [3,4,6,7],\n '500': [10]\n}"
}
}
},
"400": {
"description": "Signature not valid. Bad request."
},
"403": {
"description": "Forbidden call in cause of missing or invalid client certificate."
},
"406": {
"description": "Data format or content is not valid."
},
"413": {
"description": "Data already exist."
},
"500": {
"description": "Not able to write data. Retry please."
}
}
}
}
},
"components": {
"schemas": {
"AuditEntry": {
"type": "object",
"properties": {
"country": {
"type": "string",
"example": "DE"
},
"uploadedTime": {
"type": "string",
"format": "date-time",
"example": "2020-07-31T11:24:43.086Z"
},
"uploaderCertificate": {
"type": "string",
"example": "-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAXR3DZUUMA0GCSqGSIb3DQEBBQUAMBwxCzAJBgNVBAYT\nAkRFMQ0wCwYDVQQDDARkZW1vMB4XDTIwMDgyNzA4MDY1MloXDTIxMDkxMDA4MDY1\nMlowHDELMAkGA1UEBhMCREUxDTALBgNVBAMMBGRlbW8wggEiMA0GCSqGSIb3DQEB\nAQUAA4IBDwAwggEKAoIBAQCKR0TEJOO4z0ks4OMAovcyxuPpeZuR1JykNNFd3OR+\nvFWJLJtDYgRjtuqSuKCghLa/ci+0yIs3OeitGtajqFIukYksvX2LxOZDYDUbnpGQ\nDPNMVmpEavDBbvKON8C8K036pC41bNvwkTrfUyZ8iE+hV2+kj1SHUyw7jweEUoiw\nNmMiaXXPiMIOj7D0qnmM+iTGN9g/DrJ/IvvsgiGpK3QlQ5pnHs2BvzrSw4LFAZ8c\nSQfWKheZVHfQf26mJFdEzowrzfzForDdeFAPIIirhufE3jWFxj1thfztu+VSMj84\nsDqodEt2VJOY+DvLB1Ls/26LSmFtMnCEuBAhkbQ1E0tbAgMBAAGjEDAOMAwGA1Ud\nEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADggEBABaMEQz4Gbj+G0SZGZaIDoUFDB6n\n1R6iUS0zTBgsV8pSpFhwPryRiLdeNzIzsDdQ1ack1NfQ6YPn3/yOJ/SvnXs6n+vO\nWQW2KsuiymPSd/wjeywRRMfCysHjrmE+m+8lrFDrKuPnrACwQIsX9PDEsRRBnpSy\n5NKUZn6u3iPV9x6rwYCdCa/8VDGLqVb3eEE5dbFaYG9uW02cSbmsiZm8KmW8b6BF\neIwHVRAH6Cs1VZI8UIrdVGCE111tUo/0957rF+/doFyJcwX+4ESH0m2MsHFjXDfG\nU8yTjiUh/b2Erk4TCmrJpux30QRhsNZwkmEYSbRv+vp5/obgH1mL5ouoV5I=\n-----END CERTIFICATE-----\n"
},
"uploaderThumbprint": {
"type": "string",
"example": "69c697c045b4cdaa441a28af0ec1cc4128153b9ddc796b66bfa04b02ea3e103e"
},
"uploaderOperatorSignature": {
"type": "string",
"example": "KfyyJxglK3ol/ckgqbcZKhpazYlNAfQd/hdrBNGuTTFkFwaUYvbA4ydPOu6SXZuyqhUuLsfdK6dDVaETumMZHVLT0R/YWTsAFSAk/hmJPv+KLh1rk4+BwhfRc7E7Y7MH1JFFMuRH+hAVjMEO8LtPLmb6yMXXe+8CTTwaPG5HCVnGNsvrVuRbQekRRULmftRWyeEFxuv8CTikFG3CVl5bbBFdkHkcdrED8kg7AnYyML315iijWKH14iWrcwiuBYyIYvGxArhufuyyJfVO/bpcVvFgGrEo8SpxPJhtWRi1xLnjKHJQKdrV7dS9dD5OQHcpFQtIp7pZ9SRB3FqcCcfMMg=="
},
"signingCertificate": {
"type": "string",
"example": "-----BEGIN CERTIFICATE-----\nMIICyDCCAbCgAwIBAgIGAXR3DdOUMA0GCSqGSIb3DQEBBQUAMBwxCzAJBgNVBAYT\nAkRFMQ0wCwYDVQQDDARkZW1vMB4XDTIwMDgyNzA4MDcwOFoXDTIxMDkxMDA4MDcw\nOFowHDELMAkGA1UEBhMCREUxDTALBgNVBAMMBGRlbW8wggEiMA0GCSqGSIb3DQEB\nAQUAA4IBDwAwggEKAoIBAQCKR0TEJOO4z0ks4OMAovcyxuPpeZuR1JykNNFd3OR+\nvFWJLJtDYgRjtuqSuKCghLa/ci+0yIs3OeitGtajqFIukYksvX2LxOZDYDUbnpGQ\nDPNMVmpEavDBbvKON8C8K036pC41bNvwkTrfUyZ8iE+hV2+kj1SHUyw7jweEUoiw\nNmMiaXXPiMIOj7D0qnmM+iTGN9g/DrJ/IvvsgiGpK3QlQ5pnHs2BvzrSw4LFAZ8c\nSQfWKheZVHfQf26mJFdEzowrzfzForDdeFAPIIirhufE3jWFxj1thfztu+VSMj84\nsDqodEt2VJOY+DvLB1Ls/26LSmFtMnCEuBAhkbQ1E0tbAgMBAAGjEDAOMAwGA1Ud\nEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADggEBABISpoT/FgaCMlV0zXVq+HrHgcgl\nGSm3OQfgG1cY+YnkFY+vngdxZutJAWdCaEPmX2xBHQGp0VW7Sd6ueNpOekSZT15N\n3ZKhYc7Lqn4Ra/VkgRoOYZbmalp61unrS9AjPrlGu9/vXjLUEJOc3Qm8na3MFWgl\nhs1tOZW+CwIJM9yWRh5VmTBDIcWj/cbjizAoLEetIPeD2RiP6k1YSZ0prDPP9zGg\nJHOmNJWHTWsi6jx3Ipqm55iq2uBpasxoOBS1zAbb86vKni4R1nDAVK1MqTVHc0CD\nuGc+5KKdtbio8/zueC+PI5nN5JckuBwkOu3LYs4s6GyGNYM0zbtnqiWST0Y=\n-----END CERTIFICATE-----\n"
},
"uploaderSigningThumbprint": {
"type": "string",
"example": "69c697c045b4cdaa441a28af0ec1bb4128153b9ddc796b66bfa04b02ea3e103e"
},
"signingCertificateOperatorSignature": {
"type": "string",
"example": "o53CbAa77LyIMFc5Gz+B2Jc275Gdg/SdLayw7gx0GrTcinR95zfTLr8nNHgJMYlX3rD8Y11zB/Osyt0VLCcDZr+e6gtMms8qr0qMzw1G74cSPiKCb6TEpc/pBBGxljtOfinvksLjJzW3Pu4fbKz6KikdUjXA8lxYx//aosd7qWxo2lnxbJlo1URXw/BINanoKj+RZSSCheZzi8dbUjmfOP8IZUFvtpf3isyMpaD+5+gpcGgNqNz9aUPvwk++jjTlKj+e4ZtFkUh0nPR4hYsmXct9jn32lk2M3r3CcmvgwvW+VIrYRGSEmgjGy2EwzvA5nVhsaA+/udnmbyQw9LjAOQ=="
},
"amount": {
"type": "integer",
"format": "int64",
"example": 3
},
"batchSignature": {
"type": "string",
"example": "exampleBatchSignature"
}
},
"description": "Entity representation per country in audit results."
}
}
}
}