@twin.org/api-auth-entity-storage-service 0.9.1-next.2 → 0.9.1-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2122 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "TWIN - Test Endpoints",
5
+ "description": "REST API for TWIN - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Authentication",
20
+ "description": "Authentication endpoints for the REST server."
21
+ },
22
+ {
23
+ "name": "Authentication Admin",
24
+ "description": "Authentication Admin endpoints for the REST server."
25
+ },
26
+ {
27
+ "name": "Authentication Audit",
28
+ "description": "Authentication audit endpoints for the REST server."
29
+ }
30
+ ],
31
+ "paths": {
32
+ "/authentication/login": {
33
+ "post": {
34
+ "operationId": "authenticationLogin",
35
+ "summary": "Login to the server",
36
+ "tags": [
37
+ "Authentication"
38
+ ],
39
+ "requestBody": {
40
+ "description": "Perform a login on the server.",
41
+ "required": true,
42
+ "content": {
43
+ "application/json": {
44
+ "schema": {
45
+ "$ref": "#/components/schemas/LoginRequest"
46
+ },
47
+ "examples": {
48
+ "loginRequestExample": {
49
+ "summary": "The request to login to the server.",
50
+ "value": {
51
+ "email": "user@example.com",
52
+ "password": "MyPassword123!"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "responses": {
60
+ "200": {
61
+ "description": "Response from a login on the server.",
62
+ "content": {
63
+ "application/json": {
64
+ "schema": {
65
+ "$ref": "#/components/schemas/LoginResponse"
66
+ },
67
+ "examples": {
68
+ "loginResponseExample": {
69
+ "summary": "The response for the login request.",
70
+ "value": {
71
+ "expiry": 1722514341067
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "400": {
79
+ "description": "The server cannot process the request, see the content for more details.",
80
+ "content": {
81
+ "application/json": {
82
+ "schema": {
83
+ "$ref": "#/components/schemas/Error"
84
+ },
85
+ "examples": {
86
+ "exampleResponse": {
87
+ "value": {
88
+ "name": "GeneralError",
89
+ "message": "errorMessage",
90
+ "properties": {
91
+ "foo": "bar"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "401": {
100
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
101
+ "content": {
102
+ "application/json": {
103
+ "schema": {
104
+ "$ref": "#/components/schemas/Error"
105
+ },
106
+ "examples": {
107
+ "exampleResponse": {
108
+ "value": {
109
+ "name": "UnauthorizedError",
110
+ "message": "errorMessage"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "500": {
118
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
119
+ "content": {
120
+ "application/json": {
121
+ "schema": {
122
+ "$ref": "#/components/schemas/Error"
123
+ },
124
+ "examples": {
125
+ "exampleResponse": {
126
+ "value": {
127
+ "name": "InternalServerError",
128
+ "message": "errorMessage"
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "/authentication/logout": {
139
+ "post": {
140
+ "operationId": "authenticationLogout",
141
+ "summary": "Logout from the server",
142
+ "tags": [
143
+ "Authentication"
144
+ ],
145
+ "security": [
146
+ {
147
+ "jwtBearerAuthScheme": []
148
+ }
149
+ ],
150
+ "requestBody": {
151
+ "description": "Perform a logout on the auth token.",
152
+ "required": true,
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "$ref": "#/components/schemas/LogoutRequest"
157
+ },
158
+ "examples": {
159
+ "logoutRequestExample": {
160
+ "summary": "The request to logout from the server.",
161
+ "value": {
162
+ "token": "eyJhbGciOiJIU...sw5c"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ },
169
+ "responses": {
170
+ "204": {
171
+ "description": "The rest request ended in success with no data."
172
+ },
173
+ "400": {
174
+ "description": "The server cannot process the request, see the content for more details.",
175
+ "content": {
176
+ "application/json": {
177
+ "schema": {
178
+ "$ref": "#/components/schemas/Error"
179
+ },
180
+ "examples": {
181
+ "exampleResponse": {
182
+ "value": {
183
+ "name": "GeneralError",
184
+ "message": "errorMessage",
185
+ "properties": {
186
+ "foo": "bar"
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ },
194
+ "401": {
195
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
196
+ "content": {
197
+ "application/json": {
198
+ "schema": {
199
+ "$ref": "#/components/schemas/Error"
200
+ },
201
+ "examples": {
202
+ "exampleResponse": {
203
+ "value": {
204
+ "name": "UnauthorizedError",
205
+ "message": "errorMessage"
206
+ }
207
+ }
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "500": {
213
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
214
+ "content": {
215
+ "application/json": {
216
+ "schema": {
217
+ "$ref": "#/components/schemas/Error"
218
+ },
219
+ "examples": {
220
+ "exampleResponse": {
221
+ "value": {
222
+ "name": "InternalServerError",
223
+ "message": "errorMessage"
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "/authentication/refresh": {
234
+ "post": {
235
+ "operationId": "authenticationRefreshToken",
236
+ "summary": "Refresh an authentication token",
237
+ "tags": [
238
+ "Authentication"
239
+ ],
240
+ "security": [
241
+ {
242
+ "jwtBearerAuthScheme": []
243
+ }
244
+ ],
245
+ "requestBody": {
246
+ "description": "Perform a refresh of the auth token.",
247
+ "required": true,
248
+ "content": {
249
+ "application/json": {
250
+ "schema": {
251
+ "$ref": "#/components/schemas/RefreshTokenRequest"
252
+ },
253
+ "examples": {
254
+ "refreshTokenRequestExample": {
255
+ "summary": "The request to refresh an auth token.",
256
+ "value": {
257
+ "token": "eyJhbGciOiJIU...sw5c"
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ },
264
+ "responses": {
265
+ "200": {
266
+ "description": "Response from a refresh on the auth token.",
267
+ "content": {
268
+ "application/json": {
269
+ "schema": {
270
+ "$ref": "#/components/schemas/RefreshTokenResponse"
271
+ },
272
+ "examples": {
273
+ "refreshTokenResponseExample": {
274
+ "summary": "The response for the refresh token request.",
275
+ "value": {
276
+ "expiry": 1722514341067
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+ },
283
+ "400": {
284
+ "description": "The server cannot process the request, see the content for more details.",
285
+ "content": {
286
+ "application/json": {
287
+ "schema": {
288
+ "$ref": "#/components/schemas/Error"
289
+ },
290
+ "examples": {
291
+ "exampleResponse": {
292
+ "value": {
293
+ "name": "GeneralError",
294
+ "message": "errorMessage",
295
+ "properties": {
296
+ "foo": "bar"
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "401": {
305
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
306
+ "content": {
307
+ "application/json": {
308
+ "schema": {
309
+ "$ref": "#/components/schemas/Error"
310
+ },
311
+ "examples": {
312
+ "exampleResponse": {
313
+ "value": {
314
+ "name": "UnauthorizedError",
315
+ "message": "errorMessage"
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ },
322
+ "500": {
323
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
324
+ "content": {
325
+ "application/json": {
326
+ "schema": {
327
+ "$ref": "#/components/schemas/Error"
328
+ },
329
+ "examples": {
330
+ "exampleResponse": {
331
+ "value": {
332
+ "name": "InternalServerError",
333
+ "message": "errorMessage"
334
+ }
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ }
342
+ },
343
+ "/authentication/password": {
344
+ "put": {
345
+ "operationId": "authenticationUpdatePassword",
346
+ "summary": "Update the current user's password",
347
+ "tags": [
348
+ "Authentication"
349
+ ],
350
+ "security": [
351
+ {
352
+ "jwtBearerAuthScheme": []
353
+ }
354
+ ],
355
+ "requestBody": {
356
+ "description": "Update the current user's password.",
357
+ "required": true,
358
+ "content": {
359
+ "application/json": {
360
+ "schema": {
361
+ "$ref": "#/components/schemas/UpdatePasswordRequest"
362
+ },
363
+ "examples": {
364
+ "updatePasswordRequestExample": {
365
+ "summary": "The request to update the current user's password.",
366
+ "value": {
367
+ "currentPassword": "MyNewPassword123!",
368
+ "newPassword": "MyNewPassword123!"
369
+ }
370
+ }
371
+ }
372
+ }
373
+ }
374
+ },
375
+ "responses": {
376
+ "204": {
377
+ "description": "The rest request ended in success with no data."
378
+ },
379
+ "400": {
380
+ "description": "The server cannot process the request, see the content for more details.",
381
+ "content": {
382
+ "application/json": {
383
+ "schema": {
384
+ "$ref": "#/components/schemas/Error"
385
+ },
386
+ "examples": {
387
+ "exampleResponse": {
388
+ "value": {
389
+ "name": "GeneralError",
390
+ "message": "errorMessage",
391
+ "properties": {
392
+ "foo": "bar"
393
+ }
394
+ }
395
+ }
396
+ }
397
+ }
398
+ }
399
+ },
400
+ "401": {
401
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
402
+ "content": {
403
+ "application/json": {
404
+ "schema": {
405
+ "$ref": "#/components/schemas/Error"
406
+ },
407
+ "examples": {
408
+ "exampleResponse": {
409
+ "value": {
410
+ "name": "UnauthorizedError",
411
+ "message": "errorMessage"
412
+ }
413
+ }
414
+ }
415
+ }
416
+ }
417
+ },
418
+ "500": {
419
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
420
+ "content": {
421
+ "application/json": {
422
+ "schema": {
423
+ "$ref": "#/components/schemas/Error"
424
+ },
425
+ "examples": {
426
+ "exampleResponse": {
427
+ "value": {
428
+ "name": "InternalServerError",
429
+ "message": "errorMessage"
430
+ }
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ },
439
+ "/authentication/admin/users": {
440
+ "post": {
441
+ "operationId": "authenticationAdminCreateUser",
442
+ "summary": "Create a new user",
443
+ "tags": [
444
+ "Authentication Admin"
445
+ ],
446
+ "security": [
447
+ {
448
+ "jwtBearerAuthScheme": []
449
+ }
450
+ ],
451
+ "requestBody": {
452
+ "description": "Create a new user as an admin.",
453
+ "required": true,
454
+ "content": {
455
+ "application/json": {
456
+ "schema": {
457
+ "$ref": "#/components/schemas/AdminUserCreateRequest"
458
+ },
459
+ "examples": {
460
+ "createUserRequestExample": {
461
+ "summary": "The request to create a new user.",
462
+ "value": {
463
+ "email": "user@example.com",
464
+ "password": "MyPassword123!",
465
+ "userIdentity": "did:example:123456789abcdefghi",
466
+ "organizationIdentity": "did:example:123456789abcdefghi",
467
+ "scope": [
468
+ "scope1",
469
+ "scope2"
470
+ ]
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+ },
477
+ "responses": {
478
+ "204": {
479
+ "description": "The rest request ended in success with no data."
480
+ },
481
+ "400": {
482
+ "description": "The server cannot process the request, see the content for more details.",
483
+ "content": {
484
+ "application/json": {
485
+ "schema": {
486
+ "$ref": "#/components/schemas/Error"
487
+ },
488
+ "examples": {
489
+ "exampleResponse": {
490
+ "value": {
491
+ "name": "GeneralError",
492
+ "message": "errorMessage",
493
+ "properties": {
494
+ "foo": "bar"
495
+ }
496
+ }
497
+ }
498
+ }
499
+ }
500
+ }
501
+ },
502
+ "401": {
503
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
504
+ "content": {
505
+ "application/json": {
506
+ "schema": {
507
+ "$ref": "#/components/schemas/Error"
508
+ },
509
+ "examples": {
510
+ "exampleResponse": {
511
+ "value": {
512
+ "name": "UnauthorizedError",
513
+ "message": "errorMessage"
514
+ }
515
+ }
516
+ }
517
+ }
518
+ }
519
+ },
520
+ "500": {
521
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
522
+ "content": {
523
+ "application/json": {
524
+ "schema": {
525
+ "$ref": "#/components/schemas/Error"
526
+ },
527
+ "examples": {
528
+ "exampleResponse": {
529
+ "value": {
530
+ "name": "InternalServerError",
531
+ "message": "errorMessage"
532
+ }
533
+ }
534
+ }
535
+ }
536
+ }
537
+ }
538
+ }
539
+ }
540
+ },
541
+ "/authentication/admin/users/{email}": {
542
+ "put": {
543
+ "operationId": "authenticationAdminUpdateUser",
544
+ "summary": "Update an existing user",
545
+ "tags": [
546
+ "Authentication Admin"
547
+ ],
548
+ "parameters": [
549
+ {
550
+ "name": "email",
551
+ "description": "The user email.",
552
+ "in": "path",
553
+ "required": true,
554
+ "schema": {
555
+ "type": "string"
556
+ },
557
+ "style": "simple",
558
+ "example": "user@example.com"
559
+ }
560
+ ],
561
+ "security": [
562
+ {
563
+ "jwtBearerAuthScheme": []
564
+ }
565
+ ],
566
+ "requestBody": {
567
+ "description": "Update a user as an admin.",
568
+ "required": true,
569
+ "content": {
570
+ "application/json": {
571
+ "schema": {
572
+ "$ref": "#/components/schemas/AdminUserUpdateRequest"
573
+ },
574
+ "examples": {
575
+ "updateUserRequestExample": {
576
+ "summary": "The request to update an existing user.",
577
+ "value": {
578
+ "userIdentity": "did:example:123456789abcdefghi",
579
+ "organizationIdentity": "did:example:123456789abcdefghi",
580
+ "scope": [
581
+ "scope1",
582
+ "scope2"
583
+ ]
584
+ }
585
+ }
586
+ }
587
+ }
588
+ }
589
+ },
590
+ "responses": {
591
+ "204": {
592
+ "description": "The rest request ended in success with no data."
593
+ },
594
+ "400": {
595
+ "description": "The server cannot process the request, see the content for more details.",
596
+ "content": {
597
+ "application/json": {
598
+ "schema": {
599
+ "$ref": "#/components/schemas/Error"
600
+ },
601
+ "examples": {
602
+ "exampleResponse": {
603
+ "value": {
604
+ "name": "GeneralError",
605
+ "message": "errorMessage",
606
+ "properties": {
607
+ "foo": "bar"
608
+ }
609
+ }
610
+ }
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "401": {
616
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/Error"
621
+ },
622
+ "examples": {
623
+ "exampleResponse": {
624
+ "value": {
625
+ "name": "UnauthorizedError",
626
+ "message": "errorMessage"
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ },
633
+ "500": {
634
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
635
+ "content": {
636
+ "application/json": {
637
+ "schema": {
638
+ "$ref": "#/components/schemas/Error"
639
+ },
640
+ "examples": {
641
+ "exampleResponse": {
642
+ "value": {
643
+ "name": "InternalServerError",
644
+ "message": "errorMessage"
645
+ }
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ },
653
+ "get": {
654
+ "operationId": "authenticationAdminGetUser",
655
+ "summary": "Get existing user",
656
+ "tags": [
657
+ "Authentication Admin"
658
+ ],
659
+ "parameters": [
660
+ {
661
+ "name": "email",
662
+ "description": "The user email.",
663
+ "in": "path",
664
+ "required": true,
665
+ "schema": {
666
+ "type": "string"
667
+ },
668
+ "style": "simple",
669
+ "example": "user@example.com"
670
+ }
671
+ ],
672
+ "security": [
673
+ {
674
+ "jwtBearerAuthScheme": []
675
+ }
676
+ ],
677
+ "responses": {
678
+ "200": {
679
+ "description": "Get a user as an admin.",
680
+ "content": {
681
+ "application/json": {
682
+ "schema": {
683
+ "$ref": "#/components/schemas/AuthenticationUser"
684
+ },
685
+ "examples": {
686
+ "getUserResponseExample": {
687
+ "summary": "The response to get an existing user.",
688
+ "value": {
689
+ "email": "user@example.com",
690
+ "userIdentity": "did:example:123456789abcdefghi",
691
+ "organizationIdentity": "did:example:123456789abcdefghi",
692
+ "scope": [
693
+ "scope1",
694
+ "scope2"
695
+ ]
696
+ }
697
+ }
698
+ }
699
+ }
700
+ }
701
+ },
702
+ "400": {
703
+ "description": "The server cannot process the request, see the content for more details.",
704
+ "content": {
705
+ "application/json": {
706
+ "schema": {
707
+ "$ref": "#/components/schemas/Error"
708
+ },
709
+ "examples": {
710
+ "exampleResponse": {
711
+ "value": {
712
+ "name": "GeneralError",
713
+ "message": "errorMessage",
714
+ "properties": {
715
+ "foo": "bar"
716
+ }
717
+ }
718
+ }
719
+ }
720
+ }
721
+ }
722
+ },
723
+ "401": {
724
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
725
+ "content": {
726
+ "application/json": {
727
+ "schema": {
728
+ "$ref": "#/components/schemas/Error"
729
+ },
730
+ "examples": {
731
+ "exampleResponse": {
732
+ "value": {
733
+ "name": "UnauthorizedError",
734
+ "message": "errorMessage"
735
+ }
736
+ }
737
+ }
738
+ }
739
+ }
740
+ },
741
+ "500": {
742
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
743
+ "content": {
744
+ "application/json": {
745
+ "schema": {
746
+ "$ref": "#/components/schemas/Error"
747
+ },
748
+ "examples": {
749
+ "exampleResponse": {
750
+ "value": {
751
+ "name": "InternalServerError",
752
+ "message": "errorMessage"
753
+ }
754
+ }
755
+ }
756
+ }
757
+ }
758
+ }
759
+ }
760
+ },
761
+ "delete": {
762
+ "operationId": "authenticationAdminRemoveUser",
763
+ "summary": "Remove existing user",
764
+ "tags": [
765
+ "Authentication Admin"
766
+ ],
767
+ "parameters": [
768
+ {
769
+ "name": "email",
770
+ "description": "The user email.",
771
+ "in": "path",
772
+ "required": true,
773
+ "schema": {
774
+ "type": "string"
775
+ },
776
+ "style": "simple",
777
+ "example": "user@example.com"
778
+ }
779
+ ],
780
+ "security": [
781
+ {
782
+ "jwtBearerAuthScheme": []
783
+ }
784
+ ],
785
+ "responses": {
786
+ "204": {
787
+ "description": "The rest request ended in success with no data."
788
+ },
789
+ "400": {
790
+ "description": "The server cannot process the request, see the content for more details.",
791
+ "content": {
792
+ "application/json": {
793
+ "schema": {
794
+ "$ref": "#/components/schemas/Error"
795
+ },
796
+ "examples": {
797
+ "exampleResponse": {
798
+ "value": {
799
+ "name": "GeneralError",
800
+ "message": "errorMessage",
801
+ "properties": {
802
+ "foo": "bar"
803
+ }
804
+ }
805
+ }
806
+ }
807
+ }
808
+ }
809
+ },
810
+ "401": {
811
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
812
+ "content": {
813
+ "application/json": {
814
+ "schema": {
815
+ "$ref": "#/components/schemas/Error"
816
+ },
817
+ "examples": {
818
+ "exampleResponse": {
819
+ "value": {
820
+ "name": "UnauthorizedError",
821
+ "message": "errorMessage"
822
+ }
823
+ }
824
+ }
825
+ }
826
+ }
827
+ },
828
+ "500": {
829
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
830
+ "content": {
831
+ "application/json": {
832
+ "schema": {
833
+ "$ref": "#/components/schemas/Error"
834
+ },
835
+ "examples": {
836
+ "exampleResponse": {
837
+ "value": {
838
+ "name": "InternalServerError",
839
+ "message": "errorMessage"
840
+ }
841
+ }
842
+ }
843
+ }
844
+ }
845
+ }
846
+ }
847
+ }
848
+ },
849
+ "/authentication/admin/users/{email}/password": {
850
+ "put": {
851
+ "operationId": "authenticationAdminUpdateUserPassword",
852
+ "summary": "Update an existing user password",
853
+ "tags": [
854
+ "Authentication Admin"
855
+ ],
856
+ "parameters": [
857
+ {
858
+ "name": "email",
859
+ "description": "The user email.",
860
+ "in": "path",
861
+ "required": true,
862
+ "schema": {
863
+ "type": "string"
864
+ },
865
+ "style": "simple",
866
+ "example": "user@example.com"
867
+ }
868
+ ],
869
+ "security": [
870
+ {
871
+ "jwtBearerAuthScheme": []
872
+ }
873
+ ],
874
+ "requestBody": {
875
+ "description": "Update a users password as an admin.",
876
+ "required": true,
877
+ "content": {
878
+ "application/json": {
879
+ "schema": {
880
+ "$ref": "#/components/schemas/AdminUserUpdatePasswordRequest"
881
+ },
882
+ "examples": {
883
+ "updateUserPasswordRequestExample": {
884
+ "summary": "The request to update an existing user password.",
885
+ "value": {
886
+ "newPassword": "MyNewPassword123!"
887
+ }
888
+ }
889
+ }
890
+ }
891
+ }
892
+ },
893
+ "responses": {
894
+ "204": {
895
+ "description": "The rest request ended in success with no data."
896
+ },
897
+ "400": {
898
+ "description": "The server cannot process the request, see the content for more details.",
899
+ "content": {
900
+ "application/json": {
901
+ "schema": {
902
+ "$ref": "#/components/schemas/Error"
903
+ },
904
+ "examples": {
905
+ "exampleResponse": {
906
+ "value": {
907
+ "name": "GeneralError",
908
+ "message": "errorMessage",
909
+ "properties": {
910
+ "foo": "bar"
911
+ }
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+ },
918
+ "401": {
919
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
920
+ "content": {
921
+ "application/json": {
922
+ "schema": {
923
+ "$ref": "#/components/schemas/Error"
924
+ },
925
+ "examples": {
926
+ "exampleResponse": {
927
+ "value": {
928
+ "name": "UnauthorizedError",
929
+ "message": "errorMessage"
930
+ }
931
+ }
932
+ }
933
+ }
934
+ }
935
+ },
936
+ "500": {
937
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
938
+ "content": {
939
+ "application/json": {
940
+ "schema": {
941
+ "$ref": "#/components/schemas/Error"
942
+ },
943
+ "examples": {
944
+ "exampleResponse": {
945
+ "value": {
946
+ "name": "InternalServerError",
947
+ "message": "errorMessage"
948
+ }
949
+ }
950
+ }
951
+ }
952
+ }
953
+ }
954
+ }
955
+ }
956
+ },
957
+ "/authentication/admin/users/identity/{identity}": {
958
+ "get": {
959
+ "operationId": "authenticationAdminGetByIdentityUser",
960
+ "summary": "Get existing user by identity",
961
+ "tags": [
962
+ "Authentication Admin"
963
+ ],
964
+ "parameters": [
965
+ {
966
+ "name": "identity",
967
+ "description": "The user identity.",
968
+ "in": "path",
969
+ "required": true,
970
+ "schema": {
971
+ "type": "string"
972
+ },
973
+ "style": "simple",
974
+ "example": "did:example:123456789abcdefghi"
975
+ }
976
+ ],
977
+ "security": [
978
+ {
979
+ "jwtBearerAuthScheme": []
980
+ }
981
+ ],
982
+ "responses": {
983
+ "200": {
984
+ "description": "Get a user as an admin.",
985
+ "content": {
986
+ "application/json": {
987
+ "schema": {
988
+ "$ref": "#/components/schemas/AuthenticationUser"
989
+ },
990
+ "examples": {
991
+ "getUserResponseExample": {
992
+ "summary": "The response to get an existing user.",
993
+ "value": {
994
+ "email": "user@example.com",
995
+ "userIdentity": "did:example:123456789abcdefghi",
996
+ "organizationIdentity": "did:example:123456789abcdefghi",
997
+ "scope": [
998
+ "scope1",
999
+ "scope2"
1000
+ ]
1001
+ }
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+ },
1007
+ "400": {
1008
+ "description": "The server cannot process the request, see the content for more details.",
1009
+ "content": {
1010
+ "application/json": {
1011
+ "schema": {
1012
+ "$ref": "#/components/schemas/Error"
1013
+ },
1014
+ "examples": {
1015
+ "exampleResponse": {
1016
+ "value": {
1017
+ "name": "GeneralError",
1018
+ "message": "errorMessage",
1019
+ "properties": {
1020
+ "foo": "bar"
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+ },
1028
+ "401": {
1029
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1030
+ "content": {
1031
+ "application/json": {
1032
+ "schema": {
1033
+ "$ref": "#/components/schemas/Error"
1034
+ },
1035
+ "examples": {
1036
+ "exampleResponse": {
1037
+ "value": {
1038
+ "name": "UnauthorizedError",
1039
+ "message": "errorMessage"
1040
+ }
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ },
1046
+ "500": {
1047
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1048
+ "content": {
1049
+ "application/json": {
1050
+ "schema": {
1051
+ "$ref": "#/components/schemas/Error"
1052
+ },
1053
+ "examples": {
1054
+ "exampleResponse": {
1055
+ "value": {
1056
+ "name": "InternalServerError",
1057
+ "message": "errorMessage"
1058
+ }
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ },
1067
+ "/authentication/audit": {
1068
+ "post": {
1069
+ "operationId": "authenticationAuditCreate",
1070
+ "summary": "Create an authentication audit entry",
1071
+ "tags": [
1072
+ "Authentication Audit"
1073
+ ],
1074
+ "security": [
1075
+ {
1076
+ "jwtBearerAuthScheme": []
1077
+ }
1078
+ ],
1079
+ "requestBody": {
1080
+ "description": "Create an authentication audit entry.",
1081
+ "required": true,
1082
+ "content": {
1083
+ "application/json": {
1084
+ "schema": {
1085
+ "$ref": "#/components/schemas/AuditCreateRequest"
1086
+ },
1087
+ "examples": {
1088
+ "authenticationAuditCreateRequestExample": {
1089
+ "summary": "The request to create an authentication audit entry.",
1090
+ "value": {
1091
+ "actorId": "user@example.com",
1092
+ "event": "login-success",
1093
+ "data": {
1094
+ "organizationIdentity": "did:example:org1"
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ },
1102
+ "responses": {
1103
+ "201": {
1104
+ "description": "The rest request ended in created response.",
1105
+ "headers": {
1106
+ "location": {
1107
+ "schema": {
1108
+ "type": "string"
1109
+ },
1110
+ "description": "e.g. 018f0b53d5d5704fa3a06d6ed2478575"
1111
+ }
1112
+ }
1113
+ },
1114
+ "400": {
1115
+ "description": "The server cannot process the request, see the content for more details.",
1116
+ "content": {
1117
+ "application/json": {
1118
+ "schema": {
1119
+ "$ref": "#/components/schemas/Error"
1120
+ },
1121
+ "examples": {
1122
+ "exampleResponse": {
1123
+ "value": {
1124
+ "name": "GeneralError",
1125
+ "message": "errorMessage",
1126
+ "properties": {
1127
+ "foo": "bar"
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ },
1135
+ "401": {
1136
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1137
+ "content": {
1138
+ "application/json": {
1139
+ "schema": {
1140
+ "$ref": "#/components/schemas/Error"
1141
+ },
1142
+ "examples": {
1143
+ "exampleResponse": {
1144
+ "value": {
1145
+ "name": "UnauthorizedError",
1146
+ "message": "errorMessage"
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+ }
1152
+ },
1153
+ "500": {
1154
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1155
+ "content": {
1156
+ "application/json": {
1157
+ "schema": {
1158
+ "$ref": "#/components/schemas/Error"
1159
+ },
1160
+ "examples": {
1161
+ "exampleResponse": {
1162
+ "value": {
1163
+ "name": "InternalServerError",
1164
+ "message": "errorMessage"
1165
+ }
1166
+ }
1167
+ }
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ },
1173
+ "get": {
1174
+ "operationId": "authenticationAuditQuery",
1175
+ "summary": "Query authentication audit entries",
1176
+ "tags": [
1177
+ "Authentication Audit"
1178
+ ],
1179
+ "parameters": [
1180
+ {
1181
+ "name": "actorId",
1182
+ "description": "The actor identifier to filter by.",
1183
+ "in": "query",
1184
+ "required": false,
1185
+ "schema": {
1186
+ "type": "string"
1187
+ },
1188
+ "example": "user@example.com"
1189
+ },
1190
+ {
1191
+ "name": "organizationId",
1192
+ "description": "The organization identifier to filter by.",
1193
+ "in": "query",
1194
+ "required": false,
1195
+ "schema": {
1196
+ "type": "string"
1197
+ }
1198
+ },
1199
+ {
1200
+ "name": "tenantId",
1201
+ "description": "The tenant identifier to filter by.",
1202
+ "in": "query",
1203
+ "required": false,
1204
+ "schema": {
1205
+ "type": "string"
1206
+ }
1207
+ },
1208
+ {
1209
+ "name": "nodeId",
1210
+ "description": "The node identifier to filter by.",
1211
+ "in": "query",
1212
+ "required": false,
1213
+ "schema": {
1214
+ "type": "string"
1215
+ }
1216
+ },
1217
+ {
1218
+ "name": "event",
1219
+ "description": "The event to filter by.",
1220
+ "in": "query",
1221
+ "required": false,
1222
+ "schema": {
1223
+ "anyOf": [
1224
+ {
1225
+ "$ref": "#/components/schemas/AuthAuditEvent"
1226
+ },
1227
+ {
1228
+ "type": "string"
1229
+ }
1230
+ ]
1231
+ },
1232
+ "example": "login-success"
1233
+ },
1234
+ {
1235
+ "name": "startDate",
1236
+ "description": "The inclusive start date for filtering, in ISO 8601 format.",
1237
+ "in": "query",
1238
+ "required": false,
1239
+ "schema": {
1240
+ "type": "string"
1241
+ },
1242
+ "example": "2026-01-01T00:00:00.000Z"
1243
+ },
1244
+ {
1245
+ "name": "endDate",
1246
+ "description": "The inclusive end date for filtering, in ISO 8601 format.",
1247
+ "in": "query",
1248
+ "required": false,
1249
+ "schema": {
1250
+ "type": "string"
1251
+ },
1252
+ "example": "2026-01-31T23:59:59.999Z"
1253
+ },
1254
+ {
1255
+ "name": "cursor",
1256
+ "description": "The pagination cursor.",
1257
+ "in": "query",
1258
+ "required": false,
1259
+ "schema": {
1260
+ "type": "string"
1261
+ }
1262
+ },
1263
+ {
1264
+ "name": "limit",
1265
+ "description": "The maximum number of results to return.",
1266
+ "in": "query",
1267
+ "required": false,
1268
+ "schema": {
1269
+ "type": "string"
1270
+ },
1271
+ "example": "50"
1272
+ }
1273
+ ],
1274
+ "security": [
1275
+ {
1276
+ "jwtBearerAuthScheme": []
1277
+ }
1278
+ ],
1279
+ "responses": {
1280
+ "200": {
1281
+ "description": "Response from querying authentication audit entries.",
1282
+ "content": {
1283
+ "application/json": {
1284
+ "schema": {
1285
+ "$ref": "#/components/schemas/AuditQueryResponse"
1286
+ },
1287
+ "examples": {
1288
+ "authenticationAuditQueryResponseExample": {
1289
+ "summary": "The response for querying authentication audit entries.",
1290
+ "value": {
1291
+ "entries": [
1292
+ {
1293
+ "id": "018f0b53d5d5704fa3a06d6ed2478575",
1294
+ "actorId": "user@example.com",
1295
+ "dateCreated": "2026-01-12T09:05:23.123Z",
1296
+ "event": "login-success",
1297
+ "data": {
1298
+ "organizationIdentity": "did:example:org1"
1299
+ }
1300
+ }
1301
+ ],
1302
+ "cursor": "next-cursor"
1303
+ }
1304
+ }
1305
+ }
1306
+ }
1307
+ }
1308
+ },
1309
+ "400": {
1310
+ "description": "The server cannot process the request, see the content for more details.",
1311
+ "content": {
1312
+ "application/json": {
1313
+ "schema": {
1314
+ "$ref": "#/components/schemas/Error"
1315
+ },
1316
+ "examples": {
1317
+ "exampleResponse": {
1318
+ "value": {
1319
+ "name": "GeneralError",
1320
+ "message": "errorMessage",
1321
+ "properties": {
1322
+ "foo": "bar"
1323
+ }
1324
+ }
1325
+ }
1326
+ }
1327
+ }
1328
+ }
1329
+ },
1330
+ "401": {
1331
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1332
+ "content": {
1333
+ "application/json": {
1334
+ "schema": {
1335
+ "$ref": "#/components/schemas/Error"
1336
+ },
1337
+ "examples": {
1338
+ "exampleResponse": {
1339
+ "value": {
1340
+ "name": "UnauthorizedError",
1341
+ "message": "errorMessage"
1342
+ }
1343
+ }
1344
+ }
1345
+ }
1346
+ }
1347
+ },
1348
+ "500": {
1349
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1350
+ "content": {
1351
+ "application/json": {
1352
+ "schema": {
1353
+ "$ref": "#/components/schemas/Error"
1354
+ },
1355
+ "examples": {
1356
+ "exampleResponse": {
1357
+ "value": {
1358
+ "name": "InternalServerError",
1359
+ "message": "errorMessage"
1360
+ }
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ }
1366
+ }
1367
+ }
1368
+ },
1369
+ "/authentication/audit/{id}": {
1370
+ "get": {
1371
+ "operationId": "authenticationAuditGet",
1372
+ "summary": "Get an authentication audit entry",
1373
+ "tags": [
1374
+ "Authentication Audit"
1375
+ ],
1376
+ "parameters": [
1377
+ {
1378
+ "name": "id",
1379
+ "description": "The audit entry id.",
1380
+ "in": "path",
1381
+ "required": true,
1382
+ "schema": {
1383
+ "type": "string"
1384
+ },
1385
+ "style": "simple",
1386
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
1387
+ }
1388
+ ],
1389
+ "security": [
1390
+ {
1391
+ "jwtBearerAuthScheme": []
1392
+ }
1393
+ ],
1394
+ "responses": {
1395
+ "200": {
1396
+ "description": "Response from getting an authentication audit entry.",
1397
+ "content": {
1398
+ "application/json": {
1399
+ "schema": {
1400
+ "$ref": "#/components/schemas/AuthenticationAuditEntry"
1401
+ },
1402
+ "examples": {
1403
+ "authenticationAuditGetResponseExample": {
1404
+ "summary": "The response for getting an authentication audit entry.",
1405
+ "value": {
1406
+ "id": "018f0b53d5d5704fa3a06d6ed2478575",
1407
+ "actorId": "user@example.com",
1408
+ "dateCreated": "2026-01-12T09:05:23.123Z",
1409
+ "event": "login-success",
1410
+ "data": {
1411
+ "organizationIdentity": "did:example:org1"
1412
+ }
1413
+ }
1414
+ }
1415
+ }
1416
+ }
1417
+ }
1418
+ },
1419
+ "400": {
1420
+ "description": "The server cannot process the request, see the content for more details.",
1421
+ "content": {
1422
+ "application/json": {
1423
+ "schema": {
1424
+ "$ref": "#/components/schemas/Error"
1425
+ },
1426
+ "examples": {
1427
+ "exampleResponse": {
1428
+ "value": {
1429
+ "name": "GeneralError",
1430
+ "message": "errorMessage",
1431
+ "properties": {
1432
+ "foo": "bar"
1433
+ }
1434
+ }
1435
+ }
1436
+ }
1437
+ }
1438
+ }
1439
+ },
1440
+ "401": {
1441
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1442
+ "content": {
1443
+ "application/json": {
1444
+ "schema": {
1445
+ "$ref": "#/components/schemas/Error"
1446
+ },
1447
+ "examples": {
1448
+ "exampleResponse": {
1449
+ "value": {
1450
+ "name": "UnauthorizedError",
1451
+ "message": "errorMessage"
1452
+ }
1453
+ }
1454
+ }
1455
+ }
1456
+ }
1457
+ },
1458
+ "500": {
1459
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1460
+ "content": {
1461
+ "application/json": {
1462
+ "schema": {
1463
+ "$ref": "#/components/schemas/Error"
1464
+ },
1465
+ "examples": {
1466
+ "exampleResponse": {
1467
+ "value": {
1468
+ "name": "InternalServerError",
1469
+ "message": "errorMessage"
1470
+ }
1471
+ }
1472
+ }
1473
+ }
1474
+ }
1475
+ }
1476
+ }
1477
+ },
1478
+ "put": {
1479
+ "operationId": "authenticationAuditUpdate",
1480
+ "summary": "Update an authentication audit entry",
1481
+ "tags": [
1482
+ "Authentication Audit"
1483
+ ],
1484
+ "parameters": [
1485
+ {
1486
+ "name": "id",
1487
+ "description": "The audit entry id.",
1488
+ "in": "path",
1489
+ "required": true,
1490
+ "schema": {
1491
+ "type": "string"
1492
+ },
1493
+ "style": "simple",
1494
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
1495
+ }
1496
+ ],
1497
+ "security": [
1498
+ {
1499
+ "jwtBearerAuthScheme": []
1500
+ }
1501
+ ],
1502
+ "requestBody": {
1503
+ "description": "Update an authentication audit entry.",
1504
+ "required": true,
1505
+ "content": {
1506
+ "application/json": {
1507
+ "schema": {
1508
+ "$ref": "#/components/schemas/AuditUpdateRequest"
1509
+ },
1510
+ "examples": {
1511
+ "authenticationAuditUpdateRequestExample": {
1512
+ "summary": "The request to update an authentication audit entry.",
1513
+ "value": {
1514
+ "data": {
1515
+ "organizationIdentity": "did:example:org1"
1516
+ }
1517
+ }
1518
+ }
1519
+ }
1520
+ }
1521
+ }
1522
+ },
1523
+ "responses": {
1524
+ "204": {
1525
+ "description": "The rest request ended in success with no data."
1526
+ },
1527
+ "400": {
1528
+ "description": "The server cannot process the request, see the content for more details.",
1529
+ "content": {
1530
+ "application/json": {
1531
+ "schema": {
1532
+ "$ref": "#/components/schemas/Error"
1533
+ },
1534
+ "examples": {
1535
+ "exampleResponse": {
1536
+ "value": {
1537
+ "name": "GeneralError",
1538
+ "message": "errorMessage",
1539
+ "properties": {
1540
+ "foo": "bar"
1541
+ }
1542
+ }
1543
+ }
1544
+ }
1545
+ }
1546
+ }
1547
+ },
1548
+ "401": {
1549
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1550
+ "content": {
1551
+ "application/json": {
1552
+ "schema": {
1553
+ "$ref": "#/components/schemas/Error"
1554
+ },
1555
+ "examples": {
1556
+ "exampleResponse": {
1557
+ "value": {
1558
+ "name": "UnauthorizedError",
1559
+ "message": "errorMessage"
1560
+ }
1561
+ }
1562
+ }
1563
+ }
1564
+ }
1565
+ },
1566
+ "500": {
1567
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1568
+ "content": {
1569
+ "application/json": {
1570
+ "schema": {
1571
+ "$ref": "#/components/schemas/Error"
1572
+ },
1573
+ "examples": {
1574
+ "exampleResponse": {
1575
+ "value": {
1576
+ "name": "InternalServerError",
1577
+ "message": "errorMessage"
1578
+ }
1579
+ }
1580
+ }
1581
+ }
1582
+ }
1583
+ }
1584
+ }
1585
+ },
1586
+ "delete": {
1587
+ "operationId": "authenticationAuditRemove",
1588
+ "summary": "Remove an authentication audit entry",
1589
+ "tags": [
1590
+ "Authentication Audit"
1591
+ ],
1592
+ "parameters": [
1593
+ {
1594
+ "name": "id",
1595
+ "description": "The audit entry id.",
1596
+ "in": "path",
1597
+ "required": true,
1598
+ "schema": {
1599
+ "type": "string"
1600
+ },
1601
+ "style": "simple",
1602
+ "example": "018f0b53d5d5704fa3a06d6ed2478575"
1603
+ }
1604
+ ],
1605
+ "security": [
1606
+ {
1607
+ "jwtBearerAuthScheme": []
1608
+ }
1609
+ ],
1610
+ "responses": {
1611
+ "204": {
1612
+ "description": "The rest request ended in success with no data."
1613
+ },
1614
+ "400": {
1615
+ "description": "The server cannot process the request, see the content for more details.",
1616
+ "content": {
1617
+ "application/json": {
1618
+ "schema": {
1619
+ "$ref": "#/components/schemas/Error"
1620
+ },
1621
+ "examples": {
1622
+ "exampleResponse": {
1623
+ "value": {
1624
+ "name": "GeneralError",
1625
+ "message": "errorMessage",
1626
+ "properties": {
1627
+ "foo": "bar"
1628
+ }
1629
+ }
1630
+ }
1631
+ }
1632
+ }
1633
+ }
1634
+ },
1635
+ "401": {
1636
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
1637
+ "content": {
1638
+ "application/json": {
1639
+ "schema": {
1640
+ "$ref": "#/components/schemas/Error"
1641
+ },
1642
+ "examples": {
1643
+ "exampleResponse": {
1644
+ "value": {
1645
+ "name": "UnauthorizedError",
1646
+ "message": "errorMessage"
1647
+ }
1648
+ }
1649
+ }
1650
+ }
1651
+ }
1652
+ },
1653
+ "500": {
1654
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
1655
+ "content": {
1656
+ "application/json": {
1657
+ "schema": {
1658
+ "$ref": "#/components/schemas/Error"
1659
+ },
1660
+ "examples": {
1661
+ "exampleResponse": {
1662
+ "value": {
1663
+ "name": "InternalServerError",
1664
+ "message": "errorMessage"
1665
+ }
1666
+ }
1667
+ }
1668
+ }
1669
+ }
1670
+ }
1671
+ }
1672
+ }
1673
+ }
1674
+ },
1675
+ "components": {
1676
+ "schemas": {
1677
+ "AdminUserCreateRequest": {
1678
+ "type": "object",
1679
+ "properties": {
1680
+ "password": {
1681
+ "type": "string"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "password"
1686
+ ],
1687
+ "allOf": [
1688
+ {
1689
+ "$ref": "#/components/schemas/AuthenticationUser"
1690
+ }
1691
+ ],
1692
+ "description": "The body of the request."
1693
+ },
1694
+ "AdminUserUpdatePasswordRequest": {
1695
+ "type": "object",
1696
+ "properties": {
1697
+ "newPassword": {
1698
+ "type": "string",
1699
+ "description": "The new password for the user."
1700
+ },
1701
+ "currentPassword": {
1702
+ "type": "string",
1703
+ "description": "The current password for the user."
1704
+ }
1705
+ },
1706
+ "required": [
1707
+ "newPassword"
1708
+ ],
1709
+ "description": "The body of the request."
1710
+ },
1711
+ "AdminUserUpdateRequest": {
1712
+ "description": "The body of the request.",
1713
+ "type": "object",
1714
+ "properties": {
1715
+ "userIdentity": {
1716
+ "type": "string",
1717
+ "description": "The user identity."
1718
+ },
1719
+ "organizationIdentity": {
1720
+ "type": "string",
1721
+ "description": "The users organization."
1722
+ },
1723
+ "scope": {
1724
+ "type": "array",
1725
+ "items": {
1726
+ "type": "string"
1727
+ },
1728
+ "description": "The scope assigned to the user, comma separated."
1729
+ }
1730
+ }
1731
+ },
1732
+ "AuditCreateRequest": {
1733
+ "description": "The body of the request.",
1734
+ "type": "object",
1735
+ "properties": {
1736
+ "event": {
1737
+ "anyOf": [
1738
+ {
1739
+ "$ref": "#/components/schemas/AuthAuditEvent"
1740
+ },
1741
+ {
1742
+ "type": "string"
1743
+ }
1744
+ ],
1745
+ "description": "The audit event that occurred."
1746
+ },
1747
+ "actorId": {
1748
+ "type": "string",
1749
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1750
+ },
1751
+ "nodeId": {
1752
+ "type": "string",
1753
+ "description": "The node identifier associated with the audit entry, if applicable."
1754
+ },
1755
+ "organizationId": {
1756
+ "type": "string",
1757
+ "description": "The organization identifier associated with the audit entry, if applicable."
1758
+ },
1759
+ "tenantId": {
1760
+ "type": "string",
1761
+ "description": "The tenant identifier associated with the audit entry, if applicable."
1762
+ },
1763
+ "ipAddressHashes": {
1764
+ "type": "array",
1765
+ "items": {
1766
+ "type": "string"
1767
+ },
1768
+ "description": "The hashed IP addresses of the client."
1769
+ },
1770
+ "userAgent": {
1771
+ "type": "string",
1772
+ "description": "The user agent string of the client."
1773
+ },
1774
+ "correlationId": {
1775
+ "type": "string",
1776
+ "description": "The correlation ID for request tracing."
1777
+ },
1778
+ "data": {
1779
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1780
+ }
1781
+ },
1782
+ "required": [
1783
+ "event"
1784
+ ]
1785
+ },
1786
+ "AuditQueryResponse": {
1787
+ "type": "object",
1788
+ "properties": {
1789
+ "entries": {
1790
+ "type": "array",
1791
+ "items": {
1792
+ "$ref": "#/components/schemas/AuthenticationAuditEntry"
1793
+ },
1794
+ "description": "The returned audit entries."
1795
+ },
1796
+ "cursor": {
1797
+ "type": "string",
1798
+ "description": "The cursor to retrieve the next page, if any."
1799
+ }
1800
+ },
1801
+ "required": [
1802
+ "entries"
1803
+ ],
1804
+ "description": "The response body."
1805
+ },
1806
+ "AuditUpdateRequest": {
1807
+ "description": "The body of the request.",
1808
+ "type": "object",
1809
+ "properties": {
1810
+ "event": {
1811
+ "anyOf": [
1812
+ {
1813
+ "$ref": "#/components/schemas/AuthAuditEvent"
1814
+ },
1815
+ {
1816
+ "type": "string"
1817
+ }
1818
+ ],
1819
+ "description": "The audit event that occurred."
1820
+ },
1821
+ "actorId": {
1822
+ "type": "string",
1823
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1824
+ },
1825
+ "nodeId": {
1826
+ "type": "string",
1827
+ "description": "The node identifier associated with the audit entry, if applicable."
1828
+ },
1829
+ "organizationId": {
1830
+ "type": "string",
1831
+ "description": "The organization identifier associated with the audit entry, if applicable."
1832
+ },
1833
+ "tenantId": {
1834
+ "type": "string",
1835
+ "description": "The tenant identifier associated with the audit entry, if applicable."
1836
+ },
1837
+ "ipAddressHashes": {
1838
+ "type": "array",
1839
+ "items": {
1840
+ "type": "string"
1841
+ },
1842
+ "description": "The hashed IP addresses of the client."
1843
+ },
1844
+ "userAgent": {
1845
+ "type": "string",
1846
+ "description": "The user agent string of the client."
1847
+ },
1848
+ "correlationId": {
1849
+ "type": "string",
1850
+ "description": "The correlation ID for request tracing."
1851
+ },
1852
+ "data": {
1853
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1854
+ }
1855
+ }
1856
+ },
1857
+ "AuthAuditEvent": {
1858
+ "description": "Supported authentication audit event values.",
1859
+ "anyOf": [
1860
+ {
1861
+ "const": "login-success",
1862
+ "description": "Login success."
1863
+ },
1864
+ {
1865
+ "const": "login-failure",
1866
+ "description": "Login failure."
1867
+ },
1868
+ {
1869
+ "const": "logout",
1870
+ "description": "Logout."
1871
+ },
1872
+ {
1873
+ "const": "token-refreshed",
1874
+ "description": "Token refreshed."
1875
+ },
1876
+ {
1877
+ "const": "account-created",
1878
+ "description": "Account created."
1879
+ },
1880
+ {
1881
+ "const": "account-deleted",
1882
+ "description": "Account deleted."
1883
+ },
1884
+ {
1885
+ "const": "account-updated",
1886
+ "description": "Account updated."
1887
+ },
1888
+ {
1889
+ "const": "account-locked",
1890
+ "description": "Account locked."
1891
+ },
1892
+ {
1893
+ "const": "account-unlocked",
1894
+ "description": "Account unlocked."
1895
+ },
1896
+ {
1897
+ "const": "password-changed",
1898
+ "description": "Password changed."
1899
+ }
1900
+ ]
1901
+ },
1902
+ "AuthenticationAuditEntry": {
1903
+ "description": "Contract definition for authentication audit entry.",
1904
+ "type": "object",
1905
+ "properties": {
1906
+ "id": {
1907
+ "type": "string",
1908
+ "description": "The unique identifier for the audit entry."
1909
+ },
1910
+ "event": {
1911
+ "anyOf": [
1912
+ {
1913
+ "$ref": "#/components/schemas/AuthAuditEvent"
1914
+ },
1915
+ {
1916
+ "type": "string"
1917
+ }
1918
+ ],
1919
+ "description": "The audit event that occurred."
1920
+ },
1921
+ "dateCreated": {
1922
+ "type": "string",
1923
+ "description": "The timestamp of the audit entry in ISO 8601 format."
1924
+ },
1925
+ "actorId": {
1926
+ "type": "string",
1927
+ "description": "The actor identifier, could be e-mail, username, or other unique identifier."
1928
+ },
1929
+ "nodeId": {
1930
+ "type": "string",
1931
+ "description": "The node identifier associated with the audit entry, if applicable."
1932
+ },
1933
+ "organizationId": {
1934
+ "type": "string",
1935
+ "description": "The organization identifier associated with the audit entry, if applicable."
1936
+ },
1937
+ "tenantId": {
1938
+ "type": "string",
1939
+ "description": "The tenant identifier associated with the audit entry, if applicable."
1940
+ },
1941
+ "ipAddressHashes": {
1942
+ "type": "array",
1943
+ "items": {
1944
+ "type": "string"
1945
+ },
1946
+ "description": "The hashed IP addresses of the client."
1947
+ },
1948
+ "userAgent": {
1949
+ "type": "string",
1950
+ "description": "The user agent string of the client."
1951
+ },
1952
+ "correlationId": {
1953
+ "type": "string",
1954
+ "description": "The correlation ID for request tracing."
1955
+ },
1956
+ "data": {
1957
+ "description": "Additional data related to the audit entry, such as IP address, user agent, etc."
1958
+ }
1959
+ },
1960
+ "required": [
1961
+ "id",
1962
+ "event",
1963
+ "dateCreated"
1964
+ ]
1965
+ },
1966
+ "AuthenticationUser": {
1967
+ "description": "Contract definition for authentication user.",
1968
+ "type": "object",
1969
+ "properties": {
1970
+ "email": {
1971
+ "type": "string",
1972
+ "description": "The user e-mail address."
1973
+ },
1974
+ "userIdentity": {
1975
+ "type": "string",
1976
+ "description": "The user identity."
1977
+ },
1978
+ "organizationIdentity": {
1979
+ "type": "string",
1980
+ "description": "The users organization."
1981
+ },
1982
+ "scope": {
1983
+ "type": "array",
1984
+ "items": {
1985
+ "type": "string"
1986
+ },
1987
+ "description": "The scope assigned to the user, comma separated."
1988
+ }
1989
+ },
1990
+ "required": [
1991
+ "email",
1992
+ "userIdentity",
1993
+ "organizationIdentity",
1994
+ "scope"
1995
+ ]
1996
+ },
1997
+ "Error": {
1998
+ "description": "Model to describe serialized error.",
1999
+ "type": "object",
2000
+ "properties": {
2001
+ "name": {
2002
+ "type": "string",
2003
+ "description": "The name for the error."
2004
+ },
2005
+ "message": {
2006
+ "type": "string",
2007
+ "description": "The message for the error as an i18n key."
2008
+ },
2009
+ "source": {
2010
+ "type": "string",
2011
+ "description": "The source of the error."
2012
+ },
2013
+ "properties": {
2014
+ "type": "object",
2015
+ "additionalProperties": {},
2016
+ "description": "Any additional information for the error."
2017
+ },
2018
+ "stack": {
2019
+ "type": "string",
2020
+ "description": "The stack trace for the error."
2021
+ },
2022
+ "cause": {
2023
+ "$ref": "#/components/schemas/Error"
2024
+ }
2025
+ },
2026
+ "required": [
2027
+ "name",
2028
+ "message"
2029
+ ]
2030
+ },
2031
+ "LoginRequest": {
2032
+ "type": "object",
2033
+ "properties": {
2034
+ "email": {
2035
+ "type": "string",
2036
+ "description": "The email address for the user."
2037
+ },
2038
+ "password": {
2039
+ "type": "string",
2040
+ "description": "The password for the user."
2041
+ }
2042
+ },
2043
+ "required": [
2044
+ "email",
2045
+ "password"
2046
+ ],
2047
+ "description": "The login details."
2048
+ },
2049
+ "LoginResponse": {
2050
+ "type": "object",
2051
+ "properties": {
2052
+ "expiry": {
2053
+ "type": "number",
2054
+ "description": "The expiry time of the token."
2055
+ }
2056
+ },
2057
+ "required": [
2058
+ "expiry"
2059
+ ],
2060
+ "description": "The login response details."
2061
+ },
2062
+ "LogoutRequest": {
2063
+ "type": "object",
2064
+ "properties": {
2065
+ "token": {
2066
+ "type": "string",
2067
+ "description": "The token to logout, if it uses a mechanism with public access."
2068
+ }
2069
+ },
2070
+ "description": "The logout token details."
2071
+ },
2072
+ "RefreshTokenRequest": {
2073
+ "type": "object",
2074
+ "properties": {
2075
+ "token": {
2076
+ "type": "string",
2077
+ "description": "The token to refresh, if it uses a mechanism with public access."
2078
+ }
2079
+ },
2080
+ "description": "The refresh token details."
2081
+ },
2082
+ "RefreshTokenResponse": {
2083
+ "type": "object",
2084
+ "properties": {
2085
+ "expiry": {
2086
+ "type": "number",
2087
+ "description": "The expiry time of the token."
2088
+ }
2089
+ },
2090
+ "required": [
2091
+ "expiry"
2092
+ ],
2093
+ "description": "The refresh token details."
2094
+ },
2095
+ "UpdatePasswordRequest": {
2096
+ "type": "object",
2097
+ "properties": {
2098
+ "currentPassword": {
2099
+ "type": "string",
2100
+ "description": "The current password for the user."
2101
+ },
2102
+ "newPassword": {
2103
+ "type": "string",
2104
+ "description": "The new password for the user."
2105
+ }
2106
+ },
2107
+ "required": [
2108
+ "currentPassword",
2109
+ "newPassword"
2110
+ ],
2111
+ "description": "The body of the request."
2112
+ }
2113
+ },
2114
+ "securitySchemes": {
2115
+ "jwtBearerAuthScheme": {
2116
+ "type": "http",
2117
+ "scheme": "bearer",
2118
+ "bearerFormat": "JWT"
2119
+ }
2120
+ }
2121
+ }
2122
+ }