-
Notifications
You must be signed in to change notification settings - Fork 5
/
I_VZD_TIM_Provider_Services.yaml
593 lines (562 loc) · 18.6 KB
/
I_VZD_TIM_Provider_Services.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
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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
openapi: 3.0.1
info:
title: I_VZD_TIM_Provider_Services
description: REST interface to retrieve the TI-Messenger federation list and to administrate the TI-Messenger domains.
version: 1.3.0
# version 1.3.0
# - Attribut "domain" in the FederationList is not more a hash
# - JSON schema FederationList.json: Attribute "hashAlgorithm" removed
# - Comments containing descriptions of the hashed domains updated
#
# version 1.2.0
# - getFederationList changed: Changed from JSON response to file download
# - schema: schema FederationList and DomainList removed
# - added comments for domainAdministration operations about error messages
# - Schema Domain:
# o Mandatory attributes defined ("required")
# o Default value for attribute isInsurance added
# - Operation whereIs: Description updated with format of the MXID in URL form
#
# version 1.1.5
# Operation whereIs:
# - renamed parameter hash to mxid
# - added HTTP status code 404 Not Found
#
# version 1.1.4
# - added HTTP status code 409 for operation addTiMessengerDomain
# - renamed schema schemaFederationList to FederationList
#
# version 1.1.3
# - removed operation getPASSporTCertificates
# - added /localization operation whereIs
# - removed schema schemaPASSporTCertificates
# - added attribute isInsurance in schema Domain
#
# version 1.1.2
# - error handling improved:
# o Schema Error: Optional error message added
# o added error code 400 for getFederationList, updateTiMessengerDomain
# - corrected schema schemaPASSporTCertificates
#
# version 1.1.1
# - corrected isEnsurance ->isInsurance
# version 1.1.0
# - removed operation getPASSporTCertificates.
# - new REST crud operations for TI-Messenger domains
# version 1.0.2
# - Operation getPASSporTCertificates returns now an array of certificates in pem format
# version 1.0.1
# - added hashAlgorithm to schemaFederationList
# initiale Version
externalDocs:
description: I_VZD_TIMessenger_services REST interface
url: https://www.gematik.de
servers:
- url: https://vzd-fhir-directory.vzd.ti-dienste.de/tim-provider-services
tags:
- name: getInfo
description: This operation returns meta data about this interface
- name: getFederationList
description: Returns the TI-Messenger federation list. If a version parameter is given then the federation list will be returned only if there is a newer version available.
- name: whereIs
description: Checks in which directory part the MXID is located
- name: domainAdministration
description: Operations for the administration of the federation domains.
paths:
/:
get:
tags:
- getInfo
summary: This operation returns the meta data of this interface
description: Returns the meta data of this interface.
operationId: getInfo
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/InfoObject'
401:
description: Unauthorized
# Der WWW-Authenticate Header im Response wird auf OAuth gesetzt.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/FederationList/federationList.jws:
get:
tags:
- getFederationList
summary: This operation is used to get the TI-Messenger federation list.
description: Returns the JWS signed TI-Messenger federation list (see gemSpec_VZD_FHIR_Directory). If a version parameter is given then the federation list will be only returned if there is a newer version available.
operationId: getFederationList
parameters:
- name: version
in: query
description: Version of the known federation list
schema:
type: integer
responses:
200:
description: OK
# The federation list.
# The JWS signature has to be checked by the client.
# The structure of the federation list is defined
# in GitHub /src/schema/FederationList.json
content:
application/octet-stream:
schema:
type: string
format: binary
204:
description: No Content
# if the version of the list is less than or equal to the version parameter of the request
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/localization:
get:
tags:
- whereIs
summary: Checks in which directory part the MXID is located.
description: This operation returns the directory part, to which MXId in the request belongs.
operationId: whereIs
parameters:
- name: mxid
in: query
description: |
MXID (MXID in URL Form)
Format: matrix:user/localpart:domainpart
Beispiel MatrixID: @1-1tst-auto-ts-ow2:tim.test.gematik.de
MatrixID im URL Format: matrix:user/1-1tst-auto-ts-ow2:tim.test.gematik.de
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: string
enum: [org, pract, orgPract, none]
example: org
description: |
Returns in which part of the directory the MXID is located:
- org: Located in the Organization part
- pract: Located in the Practitioner part
- orgPract: Located in the Organization and Practitioner part
- none: Not found in any part
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
# MXID not found in FHIR VZD
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/federation:
post:
tags:
- domainAdministration
summary: Add a domain to the TI-Messenger federation
description: A new domain in the TI-Messenger federation.
# domain will be only created, if the organization which belongs to the telematikID is active
operationId: addTiMessengerDomain
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
400:
description: Bad Request
# Examples for errors:
# message "organization which belongs to the telematikID is not active"
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
409:
description: Conflict
# domain already exists
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- domainAdministration
summary: Get a TI-Messenger domain
description: Get a single or all TI-Messenger domains.
operationId: getTiMessengerDomain
parameters:
- name: domain
in: query
description: |
Domain
If this parameter is used, then the selected domain is returned.
If this parameter is not present, then all domains of the requesting client are returned.
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Domain'
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/federation/{domain}:
put:
tags:
- domainAdministration
summary: Update a domain in the TI-Messenger federation
description: A update to a domain in the TI-Messenger federation.
operationId: updateTiMessengerDomain
parameters:
- name: domain
in: path
description: |
Domain
Has to be equal to the domain in the requestBody
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
# domain will be only changed, if assigned to requesting client (TI-Messenger provider)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags:
- domainAdministration
summary: Deletes a domain in the TI-Messenger federation
description: Deletes a domain in the TI-Messenger federation.
operationId: deleteTiMessengerDomain
parameters:
- name: domain
in: path
description: Domain
required: true
schema:
type: string
responses:
204:
description: No content
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
# domain will be only deleted, if assigned to requesting client (TI-Messenger provider)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/federationCheck:
get:
tags:
- checkTiMessengerDomains
summary: This operation verifies that all own managed domains belong to active Organization ressources in the FHIR-Directory.
description: |
This operation verifies that all own managed domains belong to active Organization ressources in the FHIR-Directory.
Returns a list of all domains which belong to inactive Organizations.
The own domains are determined based on the used token.
operationId: checkTiMessengerDomains
responses:
200:
description: |
OK
Returns the list of all own domains which belong to inactive Organizations
content:
application/json:
schema:
type: object
properties:
inactiveOrganizationDomains:
type: array
items:
$ref: '#/components/schemas/Domain'
204:
description: |
No content
All domains of the client are OK
401:
description: Unauthorized
# The WWW-Authenticate header in the response is OAuth.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
403:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Domain:
type: object
required:
- domain
- telematikID
- isInsurance
properties:
domain:
description: The TI-Messenger domain
type: string
telematikID:
description: The telematikID of the organization that uses the TI-Messenger domain
type: string
isInsurance:
description: |
Indicates if it is a domain of an health insurance for insured persons
type: boolean
default: false
example: false
Error:
type: object
properties:
message:
type: string
description: (optionale) Fehlernachricht
errors:
maxItems: 50
minItems: 0
type: array
items:
$ref: '#/components/schemas/InnerError'
InnerError:
type: object
properties:
attributeName:
description: Name des Attributs, in dem ein Fehler erkannt wurde
type: string
attributeError:
description: Beschreibung des erkannten Fehlers
type: string
InfoObject:
required:
- title
- version
readOnly: true
type: object
properties:
title:
type: string
description: Der Titel der Anwendung
example: "FederationList"
description:
type: string
description: Eine kurze Beschreibung der Anwendung
example: "REST Schnittstelle zur Abfrage der Föderationsliste."
termsOfService:
type: string
format: uri
description: Eine URL zu den Terms of Service für dieses API.
example: "http://example.com/terms/"
contact:
$ref: '#/components/schemas/Contact'
license:
$ref: '#/components/schemas/License'
version:
type: string
description: Die Version von dem OpenAPI Document (YAML Datei)
example: "1.1.0"
Contact:
readOnly: true
description: Die Kontaktinformationen für diese Schnittstelle.
type: object
properties:
name:
type: string
description: Der Name von der Kontaktperson / -Organisation
example: "Firma 123"
url:
type: string
format: uri
description: Eine URL zu den Kontaktinformationen für dieses API.
In dem Dokument unter dieser URL muss ein Link zum Download der aktuell genutzten YAML Datei dieser Schnittstelle hinterlegt sein.
example: "http://www.example.com/support"
email:
type: string
format: email
description: Der E-Mail Adresse der Kontaktperson / -Organisation.
example: "support@example.com"
License:
required:
- name
readOnly: true
description: Der Lizenzinformationen für diese Schnittstelle.
type: object
properties:
name:
type: string
description: Der Lizenzname
example: "Apache 2.0"
url:
type: string
description: Eine URL zu den Lizenzinformationen für dieses API.
example: "https://www.apache.org/licenses/LICENSE-2.0.html"
securitySchemes:
OAuth2:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://to.be.defined/oauth/token
refreshUrl: https://to.be.defined/oauth/refreshToken
scopes:
VZD-FHIR-Directory:FederatioList: Client Scope
Only TI-Messenger Registrierungsdienste are allowed to use this interface.
The AccessToken contains in the "sub" claim the client identifier. The client identifier is written to to log file for each access.
security:
- OAuth2:
- FederationList